Trying to select a sibling element using jQuery and it doesn\'t work in IE7.
Here is my sample code: http://jsfiddle.net/y7AHz/6/ (click Run to see result)
This will also work in IE7:
var foo= $("#txtInput + ul.ulContainer"); var numberOfListItems = $('li', foo).length; $("#output").text(numberOfListItems);
Not sure which of the proposed fixes performs best, if it matters...