Filters in jQuery

It allow you to select a specific element based on its position in a group of elements or returns elements that match with the certain criteria. Syntax: $(selector).filter(criteria,function(index)) we will explain some types of filter like first(), last() and eq(), filter() and not() . Exxample:- <!DOCTYPE html> <html> <head> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js”></script> <script> $(document).ready(function(){ $(“p”).filter(“.elem”).css(“background-color”, “yellow”); […]

Read More