I have a google map with lots of markers on it (gathered from MySQL database). I\'m currently using the following code to change a marker\'s icon when that marker is clicked
Trigger the 'click' event on the marker when the link is clicked.
google.maps.event.trigger(gmarkers[i], "click");
example with a clickable dynamic sidebar (the click listener opens an infowindow)