jquery event handler: div becomes visible/hidden -


i have div , i'd have event handler listen when becomes visible , hidden. how do that?

thanks.

you can use callback parameter in show() , hide() methods this:

$('#mydiv').show(0, ondivshow); $('#mydiv').hide(0, ondivhide);  function ondivshow() { //your code here } function ondivhide() { //your code here } 

see working example here: http://jsfiddle.net/n7unu/


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -