Skip to content

Instantly share code, notes, and snippets.

Created December 27, 2016 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4a28050afcc3df48e40310a30a6fc25c to your computer and use it in GitHub Desktop.
Save anonymous/4a28050afcc3df48e40310a30a6fc25c to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/behidaviqo
<!DOCTYPE html>
<html>
<head>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<style id="jsbin-css">
.hidden>div {
display:none;
}
.visible>div {
display:block;
}
</style>
</head>
<body>
<section class="opcoes" >
<div class="container">
<div class="row">
<div class="col-lg-3">
<div class="add_container">
<h3>Add User</h3>
<br>
<div><!--div that we want to hide-->
<form action="action_page.php">
Username:<br>
<input type="text" name="user" value="">
<br>
Password:<br>
<input type="password" name="pw" value="">
<br><br>
<input type="submit"value="Register" name="Reg"/>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
<script id="jsbin-javascript">
$(document).ready(function(){
$('.text_container').addClass("hidden");
$('.text_container').click(function() {
var $this = $(this);
if ($this.hasClass("hidden")) {
$(this).removeClass("hidden").addClass("visible");
} else {
$(this).removeClass("visible").addClass("hidden");
}
});
});
</script>
<script id="jsbin-source-css" type="text/css">.hidden>div {
display:none;
}
.visible>div {
display:block;
}</script>
<script id="jsbin-source-javascript" type="text/javascript"> $(document).ready(function(){
$('.text_container').addClass("hidden");
$('.text_container').click(function() {
var $this = $(this);
if ($this.hasClass("hidden")) {
$(this).removeClass("hidden").addClass("visible");
} else {
$(this).removeClass("visible").addClass("hidden");
}
});
});
</script></body>
</html>
.hidden>div {
display:none;
}
.visible>div {
display:block;
}
$(document).ready(function(){
$('.text_container').addClass("hidden");
$('.text_container').click(function() {
var $this = $(this);
if ($this.hasClass("hidden")) {
$(this).removeClass("hidden").addClass("visible");
} else {
$(this).removeClass("visible").addClass("hidden");
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment