activateOnClick - not working for all clicks (tooltips)

Page: 1

Author Post
Member
Registered: Jul 2013
Posts: 17
I added activateOnClick: true to my options file in an effort to get this page to work properly.
http://www.getgolfingamerica.com/northeast.html

The page loads content dynamically via ajax.

The tooltips should display when the mouse is over the "Golf Course" name:

The tooltips don't display when the page is first loaded.
The tooltips display if I click on any part of the page. (except if I click on the tab that displays new golf course content OR If I click on a link in the left navigation that links to new golf course content)

Can you help me out with how to get this working? I'm not very good with javascript.

Thanks,
Tom
Administrator
Registered: Aug 2008
Posts: 3382
Yes, fb.activate() must be run after dynamically adding floatbox markup to a page, and yes, activateOnClick will run fb.activate() whenever the page is clicked or touched. And as you correctly observe, your golf course names aren't activated using this approach until the user clicks on something on the page -- hence the name of the option "activateOnClick".

After the ajax update of the page completes, you need to fire the fb.activate() function. This will light up your dynamic tooltipped elements right away and not wait until the user clicks something first. There's a section in the instructions that addresses your exact circumstances with a little more detail. http://floatboxjs.com/instructions#dynamic

Note that if you use fb.ajax() from the Floatbox API to bring in your dynamic content, you get activation of that content for free without having to invoke fb.activate yourself.

Page: 1