javascript - jquery slider toggle animation not working -
im trying slider work. know how make one, trying use toggle().. has proven quite difficult, know dont?
$("#slider").on("click", function () { $("#slider").toggle(function () { $(this).animate({ "height":"100px" }, 1000); }, function () { $(this).animate({ "height":"0" }, 1000); }); });
$("#slider").toggle(function () { $(this).animate({ "height":"100px" }, 1000); }, function () { $(this).animate({ "height":"20px" }, 1000); }); the correct version of form this
note: function deprecated in jquery 1.8 , removed in 1.9 https://api.jquery.com/toggle-event/. advise not use it.
Comments
Post a Comment