i read below text that say about initial state display in css and relate with show and hide dom element
do the below text describe this meaning that if we dont write display for element and hide that , it's display convert to hide and if again show that do convert display that to block or initial value related to html? for example for span if we hide span and again show that it's display convert to block or inline?
if for the same span i has writen display to block in initial css how about?
text i write about that is as follow as
" if an element starts as hidden by having its display style property value
explicitly set to none, the show() command will always set its display style prop-
erty value to block. That’s even if the element would typically default to inline
for its display value—as would a <span> element, for example. If the element
starts out without an explicitly declared display value, and we use the jQuery
hide() command to hide it, the show() command will remember the original
value and restore it to that original display state.
So it’s usually a good idea not to use style attributes on the elements we want
initially hidden, but to apply the hide() command to them in the page’s ready
handler. This prevents them from being displayed on the client, and also makes
sure everything is in a known initial state and will behave as expected during sub-
sequent hide and show operations
"
thanks alot
do the below text describe this meaning that if we dont write display for element and hide that , it's display convert to hide and if again show that do convert display that to block or initial value related to html? for example for span if we hide span and again show that it's display convert to block or inline?
if for the same span i has writen display to block in initial css how about?
text i write about that is as follow as
" if an element starts as hidden by having its display style property value
explicitly set to none, the show() command will always set its display style prop-
erty value to block. That’s even if the element would typically default to inline
for its display value—as would a <span> element, for example. If the element
starts out without an explicitly declared display value, and we use the jQuery
hide() command to hide it, the show() command will remember the original
value and restore it to that original display state.
So it’s usually a good idea not to use style attributes on the elements we want
initially hidden, but to apply the hide() command to them in the page’s ready
handler. This prevents them from being displayed on the client, and also makes
sure everything is in a known initial state and will behave as expected during sub-
sequent hide and show operations
"
thanks alot
Comment