Calling fancybox() when marker on Google maps is clicked

240 views
Skip to first unread message

Troy

unread,
Jun 16, 2009, 5:46:20 PM6/16/09
to fancybox
I'm creating an interactive map that uses fancybox to display company
information when the user click's a link. I also have a Google map on
the page with markers that show the company's location. I'd like to
call fancybox to display the company info when someone clicks the
marker on the Google map. I'm not sure how to tie the two together
though. Any help is appreciated. Here's a link to the page:

http://portcw.com/imap_v2.htm

The only link that works right now is the one for Acc-u-set
Construction.

Thanks,

Troy

Tank

unread,
Jun 17, 2009, 12:50:16 AM6/17/09
to fancybox
There is a cheat which would work in your situation. jQuery allows you
to emulate a click.

since you have a link at the bottom, -- <a id='accuset' href='/
accuset_text.htm?iframe'>Acc-u-set Construction Services, Inc.</a>
and you already have your fancybox setup to work with it,
all you need to do is replace your alert(); with $("#accuset").click
();

and just do the same for the rest.

Troy

unread,
Jun 17, 2009, 1:19:10 AM6/17/09
to fancybox
That worked perfectly! Thank you, thank you thank you...8-)

Troy
Reply all
Reply to author
Forward
0 new messages