When using Jquery to exclude elements from selection I like to use CSS :not selector because of faster performance :not() VS .not() , but from Jquery 1.8.0 it is not working anymore:(
Is there some other alternative to use with same or better performance (except .not() ) in Jquery? THX!!
This works with Jquery 1.7.2
Fiddle here
But NOT with Jquery 1.8.0
Fiddle here
$(document).ready(function(){
$("ul li:not(:first)").hide();
});
Pass it an actual CSS3 selector. It’s much faster:
Here’s your fiddle: http://jsfiddle.net/E7gBM/1/