¡@

Home 

2014/10/16 ¤W¤È 12:09:25

jquery Programming Glossary: this.context

What is the cost of '$(this)'?

http://stackoverflow.com/questions/10433014/what-is-the-cost-of-this

the new just created jQuery object and setting the length of the context to 1 Handle DOMElement if selector.nodeType this.context this 0 selector Selector here is a DOMElement this.length 1 return this I did some tests with jsPerf and I found that indeed..

Jquery performance: hide() vs is(':visible') - which is faster?

http://stackoverflow.com/questions/12312047/jquery-performance-hide-vs-isvisible-which-is-faster

set so p first .is p last won't return true for a doc with two p . rneedsContext.test selector jQuery selector this.context .index this 0 0 jQuery.filter selector this .length 0 this.filter selector .length 0 ... In short the second is faster jsPerf..

Should I cache $(this) in jQuery if it is used more than once?

http://stackoverflow.com/questions/6587687/should-i-cache-this-in-jquery-if-it-is-used-more-than-once

What's the difference between `on` and `live` or `bind`?

http://stackoverflow.com/questions/8065305/whats-the-difference-between-on-and-live-or-bind

on and just use on bind function types data fn return this.on types null data fn live function types data fn jQuery this.context .on types this.selector data fn return this delegate function selector types data fn return this.on types selector data..

What's the difference between jQuery.bind() and jQuery.on()?

http://stackoverflow.com/questions/9113783/whats-the-difference-between-jquery-bind-and-jquery-on

this.on types null data fn unbind function types fn return this.off types null fn live function types data fn jQuery this.context .on types this.selector data fn return this die function types fn jQuery this.context .off types this.selector fn return.. function types data fn jQuery this.context .on types this.selector data fn return this die function types fn jQuery this.context .off types this.selector fn return this delegate function selector types data fn return this.on types selector data fn undelegate..