这样做有什么不同:
$(this).find('.action')
或
$('.action', this)
性能?如果是的话哪一个更好,为什么?
还有别的吗?
最佳答案
这与 jQuery 文档 (http://api.jquery.com/jQuery/) 没有区别:
Internally, selector context is implemented with the .find() method, so $('span', this) is equivalent to $(this).find('span').
关于jQuery 选择器问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7129171/