i am trying to prevent all elements within a div from being selected. this is not working.
$('*').not('#someid > *')
i am trying to prevent all elements within a div from being selected. this is not working.
$('*').not('#someid > *')
Use filter()
:
$("*").filter(function() {
return !$(this).closest("#someid").length;
})
...actually doing some more testing, this should also work:
$("*:not(#someid *)")