Skip to content

Instantly share code, notes, and snippets.

@ronaldgreeff
Last active March 13, 2020 11:08
Show Gist options
  • Save ronaldgreeff/603c5888cedbe7c8c8f259820c851d11 to your computer and use it in GitHub Desktop.
Save ronaldgreeff/603c5888cedbe7c8c8f259820c851d11 to your computer and use it in GitHub Desktop.
JavaScript Wildcard
- doesn't exist, but can use starts with and ends with:
elem = document.querySelectorAll('form[id^="form"][id$="-s"]');
queryselector mathcing one id but excluding the other
document.querySelectorAll('[id^="primary_container"]:not([id="primary_container-__prefix__"])')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment