About jquery
jquery is one of the most common JavaScript frameworks, with developers using JavaScript libraries like jquery to simplify the automation and complex tasks of common tasks.
Main features of jquery
1. Get the elements in the document--jquery provides a reliable and efficient selector mechanism for accurately acquiring document elements that need to be inspected or manipulated.
2. Modify the appearance of the page--jquery provides a standard cross-browser solution that, even after a page is rendered, can still change the class or individual style properties of a section of the document.
3. Change the contents of the document--jquery can change the text, insert or flip the image, reorder the list, rewrite and extend the entire structure of the HTML document.
4. Responding to user interaction--jquery provides an appropriate way to intercept a variety of page events.
5. Add dynamic effects to the page by adding a batch of fade-in, erase-like effects in the--jquery, and a toolkit for creating new effects.
6. There is no need to refresh the page to get information from the server-this mode is ajax,jquery eliminate browser-specific complexity in this pattern.
7. Simplifying common JavaScript tasks--jquery improves operations on basic JavaScript data structures, such as iterations and array operations.
Main features of jquery
1. Leveraging the benefits of CSS-by building the mechanism for finding page elements on top of CSS selectors, jquery inherits a concise and clear way of expressing the structure of a document.
2. Support extensions-to avoid feature creep (feature sprawl), jquery uses tools that are used in special cases to be included in the plugin.
3. Abstract browser inconsistency--jquery adding an abstraction layer to standardize common tasks largely solves the browser's differences in standardized implementations.
4. Always set-oriented--jquery use implicit iterative techniques to automatically manipulate the object collection, discarding the loop structure.
5. Set multiple operations on one line-the concatenating programming model is used.
jquery Code
$ () function: Select a part of the document through the $ () factory function, and the $ () function returns a new instance of the jquery object.
$ (document). Ready (): Supports scheduling a function to be called after the DOM has been loaded without having to wait for an image in the page to load.
. addclass (): Apply extra styles for some parts of the page.