Home >>jQuery Tutorial >jQuery element Selector

jQuery element Selector

jQuery element Selector

jQuery element selector in jQuery is used to selects all elements with the specific element name.

Syntax:
$("element")

Parameter Values

Parameter Description
element It is a required parameter and used to specifies the element to select
Here is an Example of jQuery element Selector:

<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("p").css("background-color", "pink");
});
</script>
</head>
<body>
<p class="intro">My name is Phptpoint</p>
<p>I live in Noida.</p>
Who is your favourite:
<ul id="choose">
<li>PHP</li>
<li>JAVA</li>
<li>jQuery</li>
</ul>
</body>
</html>

Output:

My name is Phptpoint

I live in Noida.

Who is your favourite:
  • PHP
  • JAVA
  • jQuery

No Sidebar ads