【发布时间】:2011-11-24 06:04:55
【问题描述】:
哪个性能更好。
foo(this);
function foo(element) {
$(element).index();
}
或者我应该这样做
foo($(this));
function foo($element) {
$element.index();
}
显然考虑到我将在函数中多次使用该参数。
谢谢! 康纳
【问题讨论】:
标签: javascript jquery performance function argument-passing