How can I also add class to the last list for the second list block in IE?
- by user244394
Hi All
I have 2 list and i want to add a class ="last" to the list item 5 for both.
they seem to work fine on firefox. it add green to both list item 5.
But in IE7 it adds only the first list item 5, not the second
How can I also add class last it to the second list block as well for IE?
.last{background-color: green}
jQuery( document ).ready( function () {
// Add first and last menu item classes
$('ul.menu li:first-child').addClass( 'first_item' );
$('#menu li:last-child').addClass( 'last' );
});
list item 1
list item 2
list item 3
list item 4
list item 5
list item 1
list item 2
list item 3
list item 4
list item 5