JQuery Selector
Query Selector | Description |
---|---|
$(“*”) |
It is used to select all the HTML components/tags. |
$(“p.demo”) |
It is used to select p tag elements by using the class name of the p tag. Use a dot (.) and the class name. |
$("#li-with-id") |
It is used to select tag elements by using the id name of any tag. Use To select an element with a specific id, write a hash (#) character, the id of the element. a hash (#) and followed by the id element. |
$(“:button”) |
It is used to select the button and input elements. |
$(“tr:even”) |
It is used to select the even <tr> tag elements. |
$(“tr:odd”) |
It is used to select the odd <tr> tag elements. |
$(“span:parent”) |
It is used to select the elements which have a child element associated. |
$(“[href]”) |
It is used to select all elements with href attributes. |
$(“:input”) |
It is used to select all form input elements. |
Bibliography
https://jquery.com/ ( manual book )
https://studysection.com/
https://www.freecodecamp.org/
Tidak ada komentar:
Posting Komentar