I would like to know how I can find the last item of a specific class inside the markup.
<body>
<elem class="thatelement"></elem>
<elem></elem>
<elem class="thatelement"></elem>
<elem>
<elem class="thatelement"></elem>
</elem>
</body>
I want to find the last element of .thatelement
in the markup whether it is a directive body
child or located elsewhere in nested elements. And please provide me if its crossbrowser working.