Skip to content

Instantly share code, notes, and snippets.

@qubodup
Created July 2, 2022 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qubodup/5baab560f4222adeccc7c00c162612da to your computer and use it in GitHub Desktop.
Save qubodup/5baab560f4222adeccc7c00c162612da to your computer and use it in GitHub Desktop.
Get all elements without ANY class or id. then use :not([id]) or :not([class]) or div:not([id]):not([class]) to dominate it
$('div').each(function() {
if (!(this.hasAttribute('class') || this.hasAttribute('id'))) {
console.log("OMGvvv");
console.log(this);
console.log("OMG^^^");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment