"toggle Button Click then hide/show!"
Bootstrap 3.0.3 Snippet by muhittinbudak

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="container">
<div class="row">
<h2 id="treeTitle">Pine</h2>
<button id="tree" class="btn btn-primary btn-lg btn-block" >Tree</button>
<br>
<h2 id="flowerTitle">Daisy</h2>
<button id="flower" class="btn btn-danger btn-lg btn-block" >Flower</button>
</div>
</div>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$(document).ready(function(){
$("#tree").click(function(){
$("#treeTitle").toggle();
});
$("#flowerTitle").toggle();
$("#flower").click(function(){
$("#flowerTitle").toggle();
});
});
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: