Problem with qTip - Tips not showing because elements load after the script
Posted
by msvalkon
on Stack Overflow
See other posts from Stack Overflow
or by msvalkon
Published on 2010-01-05T10:59:15Z
Indexed on
2010/03/21
4:01 UTC
Read the original article
Hit count: 495
Hey,
I'm not very experienced with javascript, jQuery or it's plugins but usually I manage. Anyways, my client is building a site and one of its purposes is to pick up news articles from different sites and show the titles in unordered html lists. I don't have access to his code, the news articles load up rather slow(much after the site has loaded).
I'm using qTIP and the idea is that once you hover over a news title, it will generate a tooltip. This works fine in my dev environment, because I have dummy title's that are not generated from anywhere.
The problem is that once the client sets the site up in his test environment, the scripts that load the news titles into the lists are so slow, that the qTIP-script loads before there are any elements in the lists. Hence it's not aware of any <li>
's to pick up and generate tooltips from.
Is there a way make sure that ALL of the news articles are loaded before the tooltip-script loads? I think that a simple delay in loading the script is not very smart because some of the titles seem to take longer to load than others, so the delay would have to be rather long.
© Stack Overflow or respective owner