The difference between $.fn and $ in jquery

Source: Internet
Author: User
Intro: Http://blog.csdn.net/javazw123/article/details/6218603$.fn refers to the jquery namespace, plus the methods and properties on the FN, which are valid for each jquery instance. such as extension $.fn.abc () then you can look like this: $ ("#div"). ABC (); Usually use the Extend method extension, see the API in detail.
$.FX refers to the special effects of jquery. If you use display, swipe, fade, animate, and so on. $.fx.off can turn off the animation, in fact, the results are displayed directly. I do not understand, but asked the next side of the people, I still do not understand, it is probably $.fn equivalent to a static method of Java, when using the direct call

$ (#id). ABC, but no use of FN, for example,

$.validnumber = function (input) {if (!input) {alert ("Verify object is empty");   return true; }

You can just $.validnumber it when you use it.

The difference between $.fn and $ in jquery

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.