对于jQuery find(),选择器的顺序在性能上是否重要?
即。以下两个代码片段是否同时运行,选择器的顺序是唯一的区别?
$('#commentList').find('.x-comment-no-edit.new-comment').each(function(){
//Option 1
});
$('#commentList').find('.new-comment.x-comment-no-edit').each(function(){
//Option 2
});
<div id="commentList">
<div class="x-comment-no-edit"></div>
<div class="x-comment-no-edit"></div>
<div class="x-comment-no-edit new-comment"></div>
</div>