Basic Filters

Basic Filters reduce the set of matched elements to those that match the selector. Following are the attributes of the basic filter.

First: $(":first")

The first selector selects the first filtered element in a group. The first child element of a parent is been selected by this method.

Last: $(":last")

The last selector selects the last filtered element in a group. This method can be used with the other selector inorder to select the last element in a group.

Animate: (selector).animate({styles},speed,easing,callback))

The .animate() method is used trigger custom CSS animations on the selected element.

Equals: $(":eq(index)")

The equal selector selects the filtered element at index 'n' in a matched set.

Not: $(":not(selector)")

The :not selector selects all the elements that doesnot match with the specified element. All the elements except the specified elements are filtered using this method.

Even: $(":even")

The even selector filters all the elements having an even index value.(say: 0,2,4).

Odd: $(":odd")

The odd selector filters all the elements having an odd index value.(say: 1,3,5).

Greaterthan: $(":gt(index)")

The :gt selector is used to select the element having the index value greater than the specified index value.

Lessthan: $(":lt(index)")

The :lt selector is used to select the element having the index value lesser than the specified index value.

Header: $(":header")

The :header() method is used to select all the header elements from H1 to H6.

Is: $(":is(selector)")

The Jquery is() method checks if one of the selected elements matches the selectorElement.

Map: $(":map(selector)")

Jquery.map() method translates all items in an array or object to new array of items.

Slice: $(":slice(selector)")

The Jquery .slice() method constructs a new jQuery object containing a subset of the elements specified by the start and, optionally, end argument.




Ask Questions

Ask Question