To find the last element from the group of matched element, last()
method can be used.
<script>
$("div li").last().html("<b>Changed</b>");
</script>
Above code snippet will change the html value of the last “li” element found under each “div” element of the page.
Views: 9542 | Post Order: 46