Online: 13437
To filter an element from the group of similar kind of elements based on its attribute value, filter() method can be used.
<script>
$("p").filter(".class1").css("border", "1px dotted red");
</script>
Above code snippet will filter the paragraph having class as “class1” and apply css style border 1px style dotted and color red.
Views: 6162 | Post Order: 43