标签: jquery performance jquery-selectors
做法有何不同:
$(this).find('.action')
或
$('.action', this)
表现?如果是这样哪一个更好,为什么?
其他什么?
答案 0 :(得分:5)
每个jQuery文档(http://api.jquery.com/jQuery/)没有区别:
在内部,选择器上下文是使用.find()方法实现的,所以$(' span',this)相当于$(this).find(' span')