Tipsy jquery plugin is installed in my app
This is in my load function
$(function() {
tipsy();
});
Below code is in a js file
var htm = '<div id="new_div" onmouseover="tipsy(this);">' ;
function tipsy(tip)
{
if ( '' != sumtitle )
{
tip.title = tip.innerHTML;
}
else if(tip)
{
tip.title = tip.innerHTML;
}
$(tip).tipsy({gravity: 'w'});
}
How is that the normal title shows up first and then the jquery tip later.
The tipsy plugin seems to remove the
titleattribute and assign its value to a custom attribute calledoriginal-titleto avoid the default browser tooltip from showing. Maybe in your case, this happens too late: The mouse hovers over the element, this initiates the native browser tooltip. Then,tipsy()is executed on the element and switches the attribute name, but that is too late because the timeout for the native tooltip has already started.You should probably prevent the default action of the event, for example:
EDIT: As this does not seem to have the desired effect, please call
tipsy($('#new_div'))right after the div is created and remove themouseoverhandler. What you have been doing might be a bit problematic anyway: The tipsy plugin probably uses themouseoverevent, and you call.tipsy( { gravity: 'w' } )in anonmouseoverevent handler. Repeatedly, if you mouseout and then mousover again. That’s a lot of unnecessary event assignments.