1

I found a couple of posts regarding tipsy trigger and live option, but I wasn't able to get my tipsy running both with manual and live mode.

I call this function both onload and in my ajax callback:

function tipsyTips()
{
    $('.tipsytool').tipsy({ gravity: 'nw', html: true });
}

The tooltip works perfectly onload, but it's not rendered anymore with the callback. However, the very strange thing is that it perfectly works for the callback when I simply add an alert:

function tipsyTips()
{
    alert(1);
    $('.tipsytool').tipsy({ gravity: 'nw', html: true });
}

Of course, not a practicable solution, but VERY strange it works this way. Anyone knows a practicable solution? Btw, I am referring to MSIE10 (I know this browser sucks ;-)

Thanks for any advice in advance!

EDIT: some more code

//my AJAX request:
function Add2Basket(_Item, _BasketUrl)
{
    $('#Basket').load(_BasketUrl, _Item, function () { setTimeout('LoadBasket()', 0);});
}

//my AJAX callback
function LoadBasket()
{
    //...
    tipsyTips();
}

//my onload caller
$(document).ready(function ()
{
    tipsyTips();
})
4
  • Can we maybe see the AJAX code? Apr 26, 2013 at 10:54
  • could you show us the code of your ajax call?
    – Alepac
    Apr 26, 2013 at 10:57
  • that because tipsyTips() function complete before ajax get it response back.it work on alert because your code get stop on alert when your press ok on alert till that time your ajax response is completed. so instead call tipsyTips() function on ajax complete Apr 26, 2013 at 11:04
  • Update: In fact Rajesh was right. I needed to place the tipsyTips() call in the callback method of the LoadBasket() ajax call - and it works.
    – Loonis
    Apr 30, 2013 at 12:42

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.