General syntax for JQuery selector is $()
$(“p”) – select all p element on that page.
$(“#txtUserName”) – select control with mention id.
$(“.myclass”) – select control, html element which is having mention class.
$(“a[target=’_blank’]”) – select anchor tag which is having mention attribute.
$(*) – select all elements available in DOM.
JQuery allows you to select HTML elements based on parent child relations.
Note: -In above script, mainarea is the id of parent div tag and p is the child for this tag.