Incidentally, I find that the easiest to use solution is to add a custom function to jQuery with an animated add-on / margin -top / bottom too.
//this function is to avoid slideToggle jQuery jump bug. $.fn.slideShow = function(time,easing) { return $(this).animate({height:'show','margin-top':'show','margin-bottom':'show','padding-top':'show','padding-bottom':'show',opacity:1},time,easing); } $.fn.slideHide = function(time,easing) {return $(this).animate({height:'hide','margin-top':'hide','margin-bottom':'hide','padding-top':'hide','padding-bottom':'hide',opacity:0},time,easing); }
And an example of use:
$(this).slideShow(320,'easeOutQuart'); $(this).slideHide(320,'easeOutQuart');
My example is animated opacity toggle tu, you can change it as needed.
Adarchy Oct 25 '12 at 14:15 2012-10-25 14:15
source share