Hide div by default and show it on click with bootstrap
css, html, javascript, jquery, twitter-bootstrap
Solution
Just add water `style="display:none";` to the `<div>`
Fiddles I say: http://jsfiddle.net/krY56/13/
jQuery:
function toggler(divId) {
$("#" + divId).toggle();
}
Preferred to have a CSS Class `.hidden`
.hidden {
display:none;
}
Problem
I want to show and hide a `div`, but I want it to be hidden by default and to be able to show and hide it on click. Here is the code that I have made : ``` <a class="button" onclick="$('#target').toggle();"> <i class="fa fa-level-down"></i> </a> <div id="target"> Hello world... </div> ```