jQuery selectors

jQuery selectors tutorial. Learn the selectors in jQuery.

jQuery selectors

jQuery selectors

     

jQuery selectors

In this tutorial we are discussing jQuery selectors.

The jQuery selectors are one of the main feature in jQuery library .These selectors uses CSS syntax to allow page developer to easily identify the elements of page to operate upon with jQuery library methods. For using JQuery library most effectively , you must be familiar with  jQuery selectors.

Syntax pattern of jQuery selector :

$.(selector).methodName();

The selector is a string expression that identify the element on which the the method has to be implemented. For example :

$("p").click();

You can also hide the paragraph as follows :

$("p").hide();

You can also apply the CSS class to any element as :

$("p").addClass('box');

Types of jQuery selectors :

There are three categories of jQuery selector :

1.Basic CSS Selector

2.Positional Selector

3.Custom jQuery Selectors.

Learn from experts! Attend jQuery Training classes.