jQuery filter method

jQuery filter method() is used to get elements that match the specified pattern.

Syntax : jQuery filter method


– Selector expression to match the current set of elements.
– Function used to run for each elements. this represents current DOM.

jQuery filter method Example

jQuery filter() Method Example with syntax

<script type="text/javascript">// <![CDATA[
             $("li").filter(":even").css("border","1px solid red");   

// ]]></script>

Try it »


Add Comment

📖 Read More