Skip to content

Instantly share code, notes, and snippets.

@zeke
Created March 11, 2010 01:53
Show Gist options
  • Save zeke/328719 to your computer and use it in GitHub Desktop.
Save zeke/328719 to your computer and use it in GitHub Desktop.
// Before hiding all the inactive togglables, hard-code their height so
// the jQuery effect isn't choppy.
// See http://stackoverflow.com/questions/1092245/basic-jquery-slideup-and-slidedown-driving-me-mad
$(".togglable").each(function(){
$(this).css("height", $(this).height());
});
// Passive way of hiding stuff that should be hidden.
// This way it won't be for users with js disabled.
$(".inactive").hide();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment