To find the first element from the group of matched element, first()
method can be used.
<script>
$("div li").first().css("border", "5px dashed green");
</script>
Above code snippet will find first “li” element found under each “div” element of the web page.
Views: 5291 | Post Order: 45