I have a table that I made sortable using the jQuery Tablesorter 2.0 plugin . On the same page, I have a Google map that displays a marker for each element of the table. Now I want to make it so that when a <tr>freezes, the corresponding marker on the Google map is highlighted. I also want to do the opposite, when clicking on the marker will highlight the table row.
The problem I am facing is that I do not know how to associate a marker with a table row. I can get the coordinates and markers for each element using (in Javascript):
var list = [
<% foreach (var item in Model) { %>
new GMarker(new GLatLng(<%= item.Latitude %>, <%= item.Longitude %>)),
<% } %> ];
and this works fine, but I don’t know how to then associate this marker array with the rows of the table, given that the rows can be sorted. Any help in the right direction will be appreciated, as I am now very fixated.
source
share