Created
June 2, 2014 13:19
-
-
Save darobin/b8a9a07730e9549d1933 to your computer and use it in GitHub Desktop.
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
<button id=hide>Hide boxes</button> | |
<button id=show>Show boxes</button> | |
<script> | |
var $hide = $("#hide") | |
, $show = $("#show") | |
, $els = $("pre.foo") | |
; | |
function hide () { | |
$els.hide(); | |
$hide.hide(); | |
$show.show(); | |
} | |
function show () { | |
$els.show(); | |
$hide.show(); | |
$show.hide(); | |
} | |
$hide.click(hide); | |
$show.click(show); | |
// default to show | |
show(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment