JQuerySelector is a very important component of the jQuery library. JQuerySelector is used to select an HTML element. The basic statements of jQueryselector are the same as those of CSS Selector. All jQuerySelector start with $. Select HTML tag to select a... SyntaxHigh jQuery Selector, which is a very important component of the jQuery library. JQuery Selector is used to select an HTML element. The basic statements of jQuery Selector are the same as those of CSS selector. All jQuery Selector start with $. To select an HTML element, you can directly use the Tag Name of the element. For example, you can select all
Element [javascript] view plaincopyprint? $ ("P") $ ("p") the following example hides all
Element [javascript] view plaincopyprint? $ (Document ). ready (function () {$ ("button "). click (function () {$ ("p "). hide () ;}) ;}; $ (document ). ready (function () {$ ("button "). click (function () {$ ("p "). hide () ;}); # select jQuery for id selector to select the element that defines the id attribute. the id of the element on the webpage must be unique, you can use id to select a single unique element. For example, in the following example, When you click a button, only the element with the id as test is hidden. [Html] view plaincopyprint?