Created
July 1, 2014 08:58
-
-
Save gmaggio/5559ae5fcc049676a0ff to your computer and use it in GitHub Desktop.
[jQuery] Toggle height of element in jQuery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var intH = 0, | |
finH = 40; | |
$(document).ready(function(){ | |
$("#topbar").click(function () { | |
$(this).animate({ | |
height: ($(this).height() == finH) ? intH : finH | |
}, 200); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment