0

i want to apply jquery tooltip plugin from jQuery Tools website (http://flowplayer.org/tools/tooltip/index.html) to some elements loaded by ajax in my page.

i know that delegate(0 and live() methods are used for applying events to ajax loaded elements but i don't know how i can apply a plugin to these kind of elements.

the code is:

$("#mytable img").tooltip({
    // each trashcan image works as a trigger
    tip: '#tooltip',

    // custom positioning
    position: 'center right',

    // move tooltip a little bit to the right
    offset: [0, 15],

    // there is no delay when the mouse is moved away from the trigger
    delay: 0
}).dynamic({ bottom: { direction: 'down', bounce: true } });

would someone help me? thank you.

3 Answers 3

0

Apply the call to a hover function portion of your script like:

$("#mytable img").live('hover', function() {
    //your function here
});

Alternatively you can use the script directly inside the ajax page you're loading in, in which case the script is directly in the same layer as the content.

Sign up to request clarification or add additional context in comments.

Comments

0

You have to initialize the tooltip plugin on the new content on the success function of your ajax call.

Comments

0

it is solved now.i wrote it here:

jQuery Tooltip plugin error

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.