First off this is my - Test Site
This is my testing playground for Google maps, I am not concerning myself with aesthetics. What I am having trouble with is getting some jQuery to fire when I click on a link inside of the info window. If you are familiar with Google Maps this is where I create my infowindow:
GEvent.addListener(marker,"click", function() {
map.openInfoWindow(point,'<div class="infoWindow">'+windowText+'\
'+<a href='#' class='showme' onclick='return false;'>Show Comments</a>+'\
</div>');
/*On click, show all the comments*/
$('.showme').live('click', function(){
//alert('hey');
$('.comment').toggle('slow');
});
});
To understand how it works, it might be easier just to view the source on the page. Originally I had instead of using a "live event" been doing a normal "on click" which did not work. I was assuming because the info window was its own environment apart from the main window.
This was wrong I believe when I tried the "live event" and it began to work in Chrome and FF. So now I am trying to understand why the click event doesn't work in any browser, and why the live event would work in everything but IE.
Does anyone have any input?
Thanks,
Levi
Edit:Sorry, if it wasn't clear the "show comments" link in the info window is where my trouble lies.