You are a code-cleansing person, or you are a kind of "true" JSer, or you can use the code to extract a few K of traffic on the mobile client.
Do you often doubt that 100% of your code is used in the cutting edge? Is it playing its 200% checkcart? So... You got it!
JQuery (1.9.1 ):
9500 + lines of source code, 1700 + lines of Sizzle engine, compressed over 90 + K. For some small functions and small modules, it is simply killing chickens and killing dragons.
Although you can customize the components you need, you still cannot remove a large number of codes for compatibility, fault tolerance, and other judgment.
I just want to easily select a few elements or use them on the mobile phone end. What do you want to do?
So ......
This series aims to solve the following problems:
1. in the project, you only need to reference simple css selectors and simple property controllers (such as: $ (# id. class tagpattern ).css (),. attr (),. addClass (),. removeClass)
2. modular on-demand introduction. Through extend (), introduce only required functions (such as: $. get (), $. post (), $. getJSON (), $. get (), $. each, $. brower, etc)
3. Events and animations. (Such as. bind (),. animate (),. stop)
4. compatible with IE6 +, Chrome, FF, Safari, etc.
5. studying ......
Preface:
The Code involved in this series is the source code used by xiaoMo for reference. It refers to blog posts, materials, and repeatedly imitates the coding income of shanzhai. It aims to build a jQuery mini suitable for you while training JavaScript, if there is a bug or a lack of performance, you may need to correct your face.
(At This Point, other content is not complete, To be continued ......)