With jQuery, you can select (query) HTML elements and perform actions on Them.
JQuery Syntax Examples
-
$ (this). Hide ()
-
Demonstrates the JQuery hide () function, which hides the current HTML Element.
-
$ ("#test"). Hide ()
-
Demonstrates the JQuery hide () function, which hides elements of the id= "test".
-
$ ("p"). Hide ()
-
Demonstrates the jQuery hide () function, hiding all <p> elements.
-
$ (". test"). Hide ()
-
demonstrates the jQuery hide () function, hiding all elements of the class= "test".
JQuery syntax
The jQuery syntax is for the selection of HTML elements, and you can perform certain operations on Elements.
The underlying syntax Is: $ (selector). Action ()
- Dollar sign definition JQuery
- Selector (selector) "query" and "find" HTML elements
- JQuery Action () performs an operation on an element
Example
$ (this). Hide ()-hides The current element
$ ("p"). Hide ()-hides all paragraphs
$ (". test"). Hide ()-hides all elements of class= "test"
$ ("#test"). Hide ()-hides all elements of the id= "test"
Tip: The syntax used by JQuery is a combination of XPath and CSS selector syntax. In the next chapters of this tutorial, you will learn more about selectors Syntax.
/*************************deom1**********************************/
/*************************deom2**********************************/
<! DOCTYPE Html>
/*************************deom3**********************************/
/*************************deom4**********************************/
<! DOCTYPE Html>Introduction to the/************************* selector (CSS3 base is easy to Understand) *********************************/
"author": Walk Lightly 143
|
"source": http://www.cnblogs.com/qingqingzou-143/
|
"disclaimer": all post headings add (share) to the collection of outstanding articles from others, while the rest are Original. Welcome reprint, But please show this article link in the prominent position, and retain this paragraph statement, otherwise investigate legal liability, thank you!
|
jquery Syntax Basics & Selectors