使用 jQuery,如果我正在编写这样的代码
$('blah').doSomething();
//bunch of code
$('blah').doSomethingElse();
//bunch of code
$('blah').doOtherStuff();
每次我说 $('blah') 时都会创建一个新的 jQuery 对象吗?
如果是这样,是否会减少对象创建开销来做这样的事情:
var blah = $('blah');
blah.doSomething();
//bunch of code
blah.doSomethingElse();
//bunch of code
blah.doOtherStuff();
有道理?