WordPress.org

Ready to get started?Download WordPress

Forums

Infinite-Scroll
[resolved] Infinite Scroll and jQuery Tools - Tooltips (13 posts)

  1. PurpleGirl
    Member
    Posted 3 years ago #

    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

  2. PurpleGirl
    Member
    Posted 3 years ago #

    Help, please :(

  3. beaver6813
    Member
    Plugin Author

    Posted 3 years ago #

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

  4. Juraj V
    Member
    Posted 3 years ago #

    Can You give this URL to see?

  5. PurpleGirl
    Member
    Posted 3 years ago #

    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

  6. beaver6813
    Member
    Plugin Author

    Posted 3 years ago #

    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)

  7. PurpleGirl
    Member
    Posted 3 years ago #

    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

  8. beaver6813
    Member
    Plugin Author

    Posted 3 years ago #

    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.

  9. PurpleGirl
    Member
    Posted 3 years ago #

    Thank you so much, I really appreciate it. Hope I haven't messed up your Sunday evening :)

  10. beaver6813
    Member
    Plugin Author

    Posted 3 years ago #

    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 :) )

  11. PurpleGirl
    Member
    Posted 3 years ago #

    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

  12. beaver6813
    Member
    Plugin Author

    Posted 3 years ago #

    No problem :) Best of luck with the site!

  13. PurpleGirl
    Member
    Posted 3 years ago #

    Thanks I'll remember you when I make my first million :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic