Created
November 4, 2016 16:55
-
-
Save lachlanjc/0203c5f6580ef8f55775d46f513442f6 to your computer and use it in GitHub Desktop.
For when you need an element to be hidden on page load, but respond to jQuery's .show() or .toggle() later, use Rehide.
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
$(document).ready -> | |
# Assuming .hidden sets display: none | |
$('[data-behavior~=rehide]').hide().removeClass('hidden') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment