Difference between jQuery’s .hide() and setting CSS to display: none

后端 未结 7 1619
天涯浪人
天涯浪人 2020-11-30 23:19

Which am I better off doing? .hide() is quicker than writing out .css(\"display\", \"none\"), but what’s the difference and what are both of them a

相关标签:
7条回答
  • 2020-12-01 00:03

    Both do the same on all browsers, AFAIK. Checked on Chrome and Firefox, both append display:none to the style attribute of the element.

    0 讨论(0)
提交回复
热议问题