I have code something like this
<div id="abc"></div>
<div id="abc2"></div>
<div id="abc3"></div>
<div id="abc4"></div>
<div id="abc5"></div>
I want to select all div except div with id abc4 & abc using :not
My attempt:
$('div :not("#abc","#abc4")').hover(function(){...})
See the difference for yourself –
you are adding extra double quotes which is not necessary
Demo