Created
April 22, 2012 01:13
-
-
Save battlejj/2440658 to your computer and use it in GitHub Desktop.
Simple jQuery Plugin for Popping Hidden Content Sample Code
This file contains hidden or 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
<html> | |
<body> | |
<div id="main"> | |
<a id="showlink" href="?">Pop the hidden stuff</a> | |
</div> | |
<div id="hiding" style="display:none;"> | |
<h2>You can't see us...unless you pop us up!</h2> | |
<p>This is a bunch of hidden stuff. <a href="?" id="closelink">Close it!</a></p> | |
</div> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
<script src="jquery.popup.js"></script> | |
<script> | |
$(function(){ | |
$('#showlink').click(function(e){ e.preventDefault(); $('#hiding').popup(); }); | |
$('#closelink').click(function(e){ e.preventDefault(); $('#hiding').popup('close'); }); | |
}) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment