• Resolved PurpleGirl

    (@purplegirl)


    Hi,

    I’m really really hoping you can help me. I have been able to get this fantastic plugin to work… YIPEE! It’s fantastic… thank you so much!

    However… I am using jQuery Tools tooltips to display some html code on each item displayed. It works on the first page but does not work on any subsequent pages.

    I used the following code to re-initialise the function:

    jQuery(“.download_now”).tooltip();

    But it’s not working. Please tell me I’ve just made a mistake. I’ve worked to damned hard on this site, for it all to flop now.

    Also in Firebug I see the following error:

    useless setTimeout call (missing quotes around argument?)
    [Break On This Error] },

    function() { window.setTimeout(infinite_scroll_callback(), 1); } );

    Not sure if this is related. I’m using the latest version of the plugin and have jQuery 1.4.2 installed as jQuery tools will not work on the latest version

    Please tell me you have a solution… PLEASE?

    Thank you in advance

    PG

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter PurpleGirl

    (@purplegirl)

    Help, please 🙁

    Plugin Contributor beaver6813

    (@beaver6813)

    Hi,
    Do you have the URL of the site so I can debug?

    Can You give this URL to see?

    Thread Starter PurpleGirl

    (@purplegirl)

    Hi,

    Yes the url is

    http://www.celebritystylefiles.com/

    The url where both Infinite scroll and Jquery tooltips are used is

    http://www.celebritystylefiles.com/products/womens/

    I’m still working on it, so it’s not quite finished

    Thank you so much for your help

    PG

    Plugin Contributor beaver6813

    (@beaver6813)

    For some reason its got the callback as:
    ` jQuery(document).ready(function() {

    jQuery(“.download_now”).tooltip();
    });
    `
    Can you check Infinite-Scroll Options in the admin panel? In the callback section, all you should need is:
    jQuery(".download_now").tooltip();
    As the ready part could be causing errors. (Though it works for me in Firefox)

    Thread Starter PurpleGirl

    (@purplegirl)

    Hi,

    I did try that before, but it didn’t work. I just changed it again to what you have suggest, but nothing is happening. Is it working for you with the ajax loaded content? Because it isn’t for me. It only works on the first page

    Plugin Contributor beaver6813

    (@beaver6813)

    It looks as though are calling it correctly. However I tried to manually call jQuery(".download_now").tooltip(); from the Firebug console and it didn’t update the newly loaded items (which is why I suspect the callback doesn’t). I’m looking through the tooltip source code now and I think I can see the issue, I’ll reply back soon.

    Thread Starter PurpleGirl

    (@purplegirl)

    Thank you so much, I really appreciate it. Hope I haven’t messed up your Sunday evening 🙂

    Plugin Contributor beaver6813

    (@beaver6813)

    Not at all 🙂 Right, I’ll give a bit of the reasoning behind the issue incase anyone else browsing the web has the same issue (and so you can help anyone else having the same issue 🙂 )
    Basically Tooltip tries to be clever, once its already loaded on an identifier/object/<whatever the term is>, it won’t load/overwrite. Instead when you call jQuery(".download_now").tooltip(); it knows its already been called once and will return the already loaded instance:
    `// return existing instance
    var api = this.data(“tooltip”);
    if (api) { return api; }
    `
    Thats fine, but unfortunately the plugin has no delete/destroy feature, so we can’t just unset it and reset the tooltips. So we’ll be clever and use the following instead, that way the plugin will think we’re loading up a completely new instance everytime:

    jQuery(".post_box.top:last .download_now").tooltip();

    (The code above will work only on your site, but you get the idea)
    The downside of this is that there will be multiple instances of tooltip running but tbh its the best workaround and tooltip is quite a small plugin.

    Let me know if the above code works (it did in Firebug 🙂 )

    Thread Starter PurpleGirl

    (@purplegirl)

    YAY!!!!! It worked, thank you so so so much! I’ve tried it in FF and IE. I would never have been able to fix this without you. I really really appreciate your help.

    I’m so happy, if I knew where to find you I’d buy you a drink 🙂

    Thank you

    PG xxxx

    Plugin Contributor beaver6813

    (@beaver6813)

    No problem 🙂 Best of luck with the site!

    Thread Starter PurpleGirl

    (@purplegirl)

    Thanks I’ll remember you when I make my first million 🙂

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Infinite Scroll and jQuery Tools – Tooltips’ is closed to new replies.