I have an unordered list, and am using jquery to find the last ul and apply a class.
jQuery("ul.class1:last").addClass("lastUi");
The html is as follows:
<ul class="class1"></ul>
<ul class="class1"></ul>
This is working fine, however it has now changed in that another class is being added to the list so the html looks like:
<ul class="class1"></ul>
<ul class="class1 class2"></ul>
<ul class="class1"></ul>
<ul class="class1 class2"></ul>
The jQuery code is now not picking up the last ul with both class1 and class2 as the last element and isn't adding the lastUI class.