How to use element Selector Method in JQuery
This article describe about element Selector Method in JQuery.
Use element Selector method in jQuery
In this program we select all p elements.
Element selector is select all elements in p tag.
In this program tag is defined <p>.
Example
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("p").css("background-color", "Yellow");
});
</script>
</head>
<body>
<h1>This is JQuery</h1>
<p>Use Element Selector</p>
<p>I am Aman</p>
<p>Hello World</p>
Who is your favorite:
<ul id="choose">
<li>My Self</li>
<li>My Friends</li>
</ul>
</body>
</html>
|
Output
You may also want to read these related articles here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here