Well, if you want to dynamically show/hide the div, you can use jQuery show()/hide() methods. It's very easy.
Let's say you want to show the div on button click, which would hidden initially (there are different ways to make it hide ;).)
But first, see this:
$(document).ready(function() {
$("#test_div").hide();
$("#myBtn").click(function() {
$("#test_div").show();
});
});
Now, if you want to toggle the visibility of div on button click, so you'd make on css class like this,
.toogle{
display: none;
}
And the jQuery:
$(document).ready(function() {
$("#test_div").addClass("toggle");
$("#myBtn").click(function() {
$("#test_div").toggleClass("toggle");
});
Please refer the documentation for more idea. And here's an excellent example of hide/show on
W3C[
^].
Cheers !
-KR