Created
February 20, 2013 01:26
-
-
Save fstamour/4991905 to your computer and use it in GitHub Desktop.
Code Jquery minimal pour avoir une div (ou n'importe-quel balise) que l'on peut afficher/cacher.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title> | |
Dev | |
</title> | |
<script type="text/javascript" src="jquery-1.9.0.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$(".slidingDiv").hide(); | |
$(".show_hide").show(); | |
$('.show_hide').click(function(){ | |
$(this).find(".slidingDiv").each( function() { $(this).slideToggle(); } ); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<div class="show_hide" > <a href="javascript:void(0)">Show/Hide Json</a> | |
<div class="slidingDiv" > </div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment