Skip to content

Instantly share code, notes, and snippets.

@zeke
Created March 11, 2010 01:53
Show Gist options
  • Select an option

  • Save zeke/328719 to your computer and use it in GitHub Desktop.

Select an option

Save zeke/328719 to your computer and use it in GitHub Desktop.

Revisions

  1. zeke created this gist Mar 11, 2010.
    10 changes: 10 additions & 0 deletions gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    // 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();