[solved] Jquery animate; how to return to previous height? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: [solved] Jquery animate; how to return to previous height? (/showthread.php?tid=43942) |
[solved] Jquery animate; how to return to previous height? - El Forum - 07-28-2011 [eluser]umbungo[/eluser] I have a variable height div which is hidden using a nice JQuery animation, which changes the height (etc) of the div. How can i return the height to what it was before when un-hiding?? Simplified code example; Code: $(".open").live('click', function() { (NB: i have used height: 100%, and it 'works' but is no good for me because it messes up the animation, which works fine when a height is set). [solved] Jquery animate; how to return to previous height? - El Forum - 07-29-2011 [eluser]waynhall[/eluser] Is your variable declared outside the function? [solved] Jquery animate; how to return to previous height? - El Forum - 07-29-2011 [eluser]umbungo[/eluser] Code: $(".open").live('click', function() { |