jQuery performance: hide() vs is(':visible') - which is faster?

后端 未结 3 491
故里飘歌
故里飘歌 2021-01-15 05:21

I have multiple dropdown boxes which drop when their link is clicked. The boxes have the possibility to overlap if they are open at the same time.

Is it faster to qu

3条回答
  •  猫巷女王i
    2021-01-15 05:50

    I think its faster to hide it always. Another option could be to create a reference for the box example var b = $('#box2'). rather than calling $('#box2'). I think this would be the best option.

提交回复
热议问题