$('#id tag') vs. $('#id').find('tag') - which is preferable?

前端 未结 6 888
情深已故
情深已故 2020-12-10 11:54

I want to know which option is better, particularly in terms of their speed:

$(\'#id tag\')...

or

$(\'#id\').find(\'tag\')         


        
6条回答
  •  温柔的废话
    2020-12-10 12:13

    as ive said - its different in browsers.

    chrome :

    http://i.stack.imgur.com/SijQY.jpg enter image description here

    ie

    http://i.stack.imgur.com/axhGw.jpg enter image description here

提交回复
热议问题