Category: jQuery

Class Selector in jQuery with Example

5 / 5 ( 1 vote ) In previous tutorials, we have seen how to select HTML elements using their ID and Tag name.  In this tutorial, we will proceed with another selector which is a class selector.  We will select elements based on their class name.  The syntax for selecting an element by class

Odd & Even Selectors in jQuery

5 / 5 ( 1 vote ) Whenever you select an element by Tag Name, it will return collection of elements which have the same Tag Name.  That collection always starts from 0.  We can manipulate those elements by their odd and even position in collection using Odd and Even selectors in jQuery.  We are

Tag Name Selector in jQuery

5 / 5 ( 1 vote ) Today, we are going to manipulate HTML elements by selecting them using their tag name.  We are going to perform 3 kinds of selection using tag name. Single Element (Single Tag Name). Multiple Elements (Multiple Tag Names). Element descendant of another Element. Single Element:  The syntax for selecting

ID Selector in jQuery

5 / 5 ( 1 vote ) In HTML, each element can have its unique ID.  This unique ID is further used by JavaScript and jQuery for manipulation.  Having a unique ID for each element will make easy for jQuery and JavaScript to find the right HTML element in DOM.  In jQuery, we use hash

Selectors in jQuery

3 / 5 ( 2 votes ) As we know, jQuery is mainly used to manipulate HTML elements in DOM.  The jQuery selectors play an important role in such manipulation.  Selectors help you in selecting right HTML element for manipulation.  You can add event handlers, styles, change attribute values of any HTML element etc. Some