Home >Web Front-end >JS Tutorial >jQuery study notes: $_jquery in jQuery
In jQuery, the most commonly used one is the dollar sign $, which provides a variety of rich functions. Including selecting one or a type of element in the page, prefixing it as a functional function, improving windows.onload, creating DOM nodes, etc. This article introduces the usage of jQuery. As a basis
1. Selector
In CSS, the function of a selector is to select a certain type of element (category selector) or an element (id selector) on the page. As a selector, "$" in jQuery also selects a certain type or element, but jQuery provides a more comprehensive selection method. And it solves browser compatibility issues for users.
For example, in the element under css, css:
h2 a{
/* Add css attributes */}
In jQuery, use the following code to select the a element under h2 as an object array for use by javascript.
$("H2 a")
Example: