How can I manipulate the content within the maps info window with javascript
-
I just want to start off by saying that this did not work.
jQuery(document).bind('em_maps_location_hook', function( e, map, infowindow, marker ){ 2 .... 3 });
Ok the way I am using map is with the short code [locations_map]
Now within the maps info window I have formatted it to display #_LOCATIONNEXTEVENTS so that I can see all of the upcoming event dates for that specific location. It all work out fine except the fact that I do NOT want it to display the time.
What the formatting looks like: – May 19 – May 20 – 12:00 am
I am trying to get rid of – 12:00 am with javascript which is easy with the replace function but I cannot seem to target the content within the info window at all.
There is couple of li’s nested within a ul within the infowindow and I am tring to target all of the li’s and their text like so.
$('#inner-map-info li').each(function(index, el) { $(el).text().replace('- 12:00 am',''); });
but like I mentioned I cannot seem to target any elements within the infowindow of the map event, not even with the bind function. Does anyone know what’s going on?
And just for the sake of testing I wrote all of this code within my footer.php within a script tag at the bottom, which shouldn’t be a problem but I just thought that was worth mentioning.
- The topic ‘How can I manipulate the content within the maps info window with javascript’ is closed to new replies.