Is there any difference between
jQuery(\'#id\').show() and jQuery(\'#id\').css(\"display\",\"block\")
and
jQuery(\'#id\').
Yes there is a difference in the performance of both:
jQuery('#id').show()
is slower than jQuery('#id').css("display","block")
as in former case extra work is to be done for retrieving the initial state from the jquery cache as display is not a binary attribute it can be inline
,block
,none
,table
, etc.
similar is the case with hide()
method.
See: http://jsperf.com/show-vs-addclass