Skip to content

Instantly share code, notes, and snippets.

@mathieuancelin
Created January 19, 2012 16:27
Show Gist options
  • Save mathieuancelin/1640995 to your computer and use it in GitHub Desktop.
Save mathieuancelin/1640995 to your computer and use it in GitHub Desktop.
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css"></link>
</head>
<body>
<br/>
<a class="btn success" id="hide" href="#">Apparition</a>
<br/><br/>
<div id="image"><img class="thumbnail" src="http://placehold.it/330x230" alt=""></img></div>
<br/>
<script type="text/javascript">
$('#hide').click(function() {
if ($('#hide').text() == "Apparition") {
$('#image').show();
$('#hide').text("Disparition");
} else {
$('#image').hide();
$('#hide').text("Apparition");
}
});
$('#image').hide();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment