Category Archives: Jquery Blog
jQuery not Method
jQuery “not()” is used to remove the element from set of the matched elements. We have explained not method in jQuery with example and demo. Lets check out syntax of jQuery not Method and try it with our live editor.
Syntax : jQuery not() method
Here is syntax for jQuery not Method –
$(selector).not(criteria,function(index));
Criteria : Is selector expression, jQuery object or element which is removed from matched element.
function : Runs for each element and returns true if the element is removed from the set.
jQuery not Method Example with Editor
Here is an example with demo try it to test the functionality of the not method-
The above example will produce the following output as below –
jQuery nextUntil method
jQuery “nextUntil()” is used to get the next siblings of the matched elements.
Syntax : jQuery nextUntil() method
$(selector).nextUntil(selector-element,filter);
selector-element : selector-element is stop point.
jQuery nextUntil Method Example
jQuery nextAll method
jQuery “nextAll()” method is used to get all the next siblings of the matched elements.
Syntax : jQuery nextAll() method
$(selector).nextAll(selector-element);
selector-element : Is optional, you can add selector-element to get next element.
jQuery nextAll Method Example 1
jQuery nextAll Method Example 2
jQuery map method
jQuery “last()” method passes each element in current matched set using a function which generates new jQuery objects and returns value.
Syntax : jQuery map() method
$(selector).map(function(index,element));
index : Index of current element.
element : Current element.
jQuery map Method Example
jQuery last method
jQuery “last()” method is used to get the last element of the selected elements.
Syntax : jQuery last() method
$(selector).last();
Note : It accepts no parameter.
jQuery last method Example
jQuery is method
jQuery “is()” method is used to match the current set of elements against the jQuery selector,jQuery Object or jQuery element. If argument matches any of these elements it returns true .
Syntax : jQuery is() method
$(selector).is(selector-element,function(index,element));
selector-element: Pattern to match the current set of elements against selector-element.
– index : Current index of element.
– element : Current element.
jQuery is() Example
jQuery has method
jQuery has method is used to get the elements which contains the particular element inside it.
Syntax : jQuery has method
$(selector).has(element);
element: Pattern to match the elements which has the supplied element in has method.