PDA

View Full Version : how to init stickytooltip on postback ?



Surojit Seal
03-14-2014, 07:18 AM
1) Script Title: how to init stickytooltip on postback

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex5/stickytooltip.htm

3) Describe problem: I can use stickytooltip on my aspx page and it works fine when loading first time. But on postback the jquery bind to onmouseenter etc. on the images that have data-tooltip attribute does not occur. I need to call the stickytooltip.init again after postback. How do I do that ? NOTE: for some other jquery plugins (http://www.pixedelic.com/plugins/camera/), I could call init functions as below example:


function Camera_mypostback() {
jQuery('#camera_wrap_1').camera({
thumbnails: true,
height: '450px'
});
return false;
};

I am new at jquery so please give code for solution.

ddadmin
03-27-2014, 06:40 PM
Is the initialization code for the tooltip being called more than once:


stickytooltip.init("*[data-tooltip]", "mystickytooltip")

?

If so to facilitate this, try finding the line below inside the .js file, and adding the line in red to it:


if (stickytooltip.stickynotice1.join)
stickytooltip.stickynotice1=stickytooltip.stickynotice1.join(' ')


Then, you should be able to call the init() function more than once on the page without it breaking.