twitter bootstrap 3 - how to add funtion to glyph icon plus and minus inbootstrap-3 -


i using glyph icon-plus , minus in bootstrap on web page.i want add functionality 2 glyph-icons. on clicking plus panel must added container , on clicking on glyph icon minus individual panel must removed.

how can achieve this?i don't know how code in java script,even new j query.

you can call function other dom object

 <div class="container">   <h2>menu-up glyph</h2>   <p>menu-up icon: <span class="glyphicon glyphicon-plus"></span></p>   </div> 

in js

 $(".glyphicon-plus").click(function(){     alert("the paragraph clicked."); }); 

or other way

<p>menu-up icon: <span onclick='alert("youclickedme!");' class="glyphicon glyphicon-plus"> 

Comments