[Everydaynote] Fragmented not an article

Source: Internet
Author: User

Today's work get to a few fragmented little knowledge points:

1. $.noop

The function of jquery, which represents an empty function that needs to be used when passing an empty function, is better than function () {} In that it does not create an instance of the functions, saving memory.

2. $.extend ({}, data)

jquery's merging functions, which are explained here, can be used to take the copy value of data instead of the referenced value (if data is a reference type).

3. The parameters of the custom validation rule function in cc (FieldData, fieldrules, alldata) can be passed three (or only the first one), so that all validation values can be obtained.

4. Parameters of function in $.each (index, item)

5. The MVVM (Module view viewmodule) template separates the data and facilitates the free combination of view with Viewmodule.

6. Momentjs Date processing class Library, very comprehensive, documentation here.

7. Ractivejs's computed, used to calculate data, is commonly used to write filter filters. The place where computed is better than writing the formula in data is easy to monitor changes.

Feel:

1. jquery must be mended;

2. Understand things from the macro to the subtle.

[Everydaynote] Fragmented not an article

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.