Fixed!! For anyone else interested to know, this is how it was done:
$('#map_canvas').click(function() { shadowboxInterval =
setInterval(addShadowboxListener, 100); });

var addShadowboxListener = function() {
        if($('#map_canvas a[rel^="shadowbox"]').length > 0){
                $('#map_canvas a[rel^="shadowbox"]').click(function()
{Shadowbox.open(this);return false;});
                clearInterval(shadowboxInterval);
        }
}

So what it's doing is adding an event every time the map canvas is
clicked, then running a method every 1/10th of a second which targets
the link using the ref, if that link exists then add the click event
to that link to run the shadowbox code then clear the interval. My
problem was that I was trying to target a link that hadn't existed yet
thus needing the setInterval.

Thanks for your help anyway :)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to