I want to select all HTML <span> elements that don’t have an id equal to x and hide them them. Is this possible? I think you have to use the :not selector but I can’t work it out:
$('span:not(#x').attr('style', "display: none;");
Any ideas? Thank you :).
You just forgot a ).
I made a fiddle to show you. http://jsfiddle.net/3U8tD/