Read the jquery source explanation notes

Source: Internet
Author: User

1. Methods defined in Jquery.fn=jquery.prototype: init, map, each, ToArray, get, Pushstack, ready, Slice,first, Last, EQ, map,end; Properties: jquery, constructor, selector, length, push, sort, splice (the latter three are for internal use only).

2, through jQuery.fn.init.prototype = Jquery.fn; Avoid the confusion of this. This appears to JQuery.fn.init rewrite the Init method in its prototype object Jquery.fn, and then create the JQuery instance by using the new JQuery.fn.init (selector, context, rootjquery). Thus jquery also inherits all the methods and attributes in its jquery.fn.

Read the jquery source explanation notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.