I would advise that you prefer changing the style attribute instead of visibility, to make you code more universal and regular while gaining more fine-grain control. Also, I would advise you do it using jQuery.
Please see the jQuery methods
.addClass()
,
.removeClass()
,
.toggleClass()
and other CSS methods:
http://api.jquery.com/category/css/[
^].
You can find a code sample here:
http://api.jquery.com/addClass/[
^].
The CSS property you would need to operate would be
visibility
; please see:
http://www.w3schools.com/css/css_display_visibility.asp[
^].
As a rule of thumb, if some effect can be achieved both through CSS and from more specialized attibutes, CSS approach should be preferred. It will help you to have more supportable code because extra flexibility and isolation between code and style will make possible changes less painful.
—SA