Trying to find a selector to get all elements that have both no class, and no id set to them.
So far I have 2 different outputs depending on if there is a space in
withSpace - $('*:not([id]) *:not([class])'); will find all elements with no class that are inside an element without an ID. Putting a space in the selector is like calling find seperately.
You could change noSpace to be this instead and still get the right result:
var noSpace= $('*:not([id]):not([class])'); // second * not needed
JSFiddle used for testing