What is the difference between element.css(\'visibility\', \'visible\')
and element.show()
. Also, what is the difference between element.css(\'vi
jquery.hide() is equivalent to calling .css('display', 'none')
and and jquery.show is equivalent to calling .css('display', 'block')
The .css()
method is just setting the visibility property.
From the css point of view difference :
visbility : hidden
The value hidden makes the generated boxes invisible without removing them from the layout. Descendant boxes can be made visible. See this
display : none
A value of none makes the element generate no box at all. Descendant boxes cannot generate boxes either, even if their display property is set to something other than none.See this
With hidden the element is still generated.