I know hover()
has default setting for handIn
and handOut
, but is there anyway I could detect slideUp
and SlideDown
inside SlideToggle
?
Have code like this:
$("#divName").slideToggle(function(){//when slideUp, do something},
function(){//when slideDown, do something});
I tried this code but no luck, do you guys think this may sometimes make things a bit easier ?
slideToggle
just take duration and a callback for complete. API is not designed to work as you expected. But you can achieve this effect usingtoggle
, just try it out – Magdalenemagdalenian