Tutorial Animate Height/Width to “Auto”

It's not possible to do thing.animate({ "height": "auto" });. So this is Darcy Clarke's method to allow that to ...

It's not possible to do thing.animate({ "height": "auto" });. So this is Darcy Clarke's method to allow that to work. You essentially clone the element, remove the fixed heights currently inflicting the element, and measure/save the value. Then you animate the real element to that value.
jQuery.fn.animateAuto = function(prop, speed, callback){
var elem, height, width;
return this.each(

Hot in Week

Popular

Archive

item