views:

36

answers:

2

How to change css display none or block property using Jquery?

+4  A: 

Use the jQuery css method:

$("#id").css("display", "none");
$("#id").css("display", "block");
GenericTypeTea
Thank you for your replay ;-)
learner
+2  A: 

If the display of the div is block by default, you can just use .show() and .hide(), or even simpler, .toggle() to toggle between visibility.

reko_t
True, it will set display to whatever it was initially, which could be block or something different.
danielgwood