Does jQuery $(this) need to be cached

后端 未结 6 689
一生所求
一生所求 2021-01-13 14:05

I recently came accross some blog posts about jQuery performance (i.e. http://net.tutsplus.com/tutorials/javascript-ajax/10-ways-to-instantly-increase-your-jquery-performanc

6条回答
  •  情深已故
    2021-01-13 14:47

    That's actually a simple question, that regards javascript itself. If you assign a variable to a object that is gathered by running a function, and if you'll need to use that object several times, it's obvious that you'll increase performance.

    Lessen the function calls and you're on the way to it :)

提交回复
热议问题