Skip to content

Instantly share code, notes, and snippets.

@monkpit
Forked from kpittman-securus/addSizzle.js
Created July 8, 2021 19:08
Show Gist options
  • Save monkpit/c439dd7545c62b4ad615da51ca3340f1 to your computer and use it in GitHub Desktop.
Save monkpit/c439dd7545c62b4ad615da51ca3340f1 to your computer and use it in GitHub Desktop.
Add Sizzle to window (jQuery selector engine)
const sizzleScript = document.createElement('script');
sizzleScript.src = 'https://cdn.jsdelivr.net/npm/sizzle@latest/dist/sizzle.min.js';
document.getElementsByTagName('head')[0].appendChild(sizzleScript);
window.sz = window.Sizzle;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment