Drop-in solution for dynamic adding/removing of stylesheets.
- You need jQuery.
- That's it.
- Include jquery.cssSwitcher.js in your project
- After the DOM is ready, you will see a global variable called
$cssSwitcher
declared.
add
-- function that takes acssUrl
parameter and adds it to the DOM.replace
-- function that takesoldUrl
andnewUrl
, and replaces the old reference with the new.remove
-- function that takescssUrl
and removes it from the DOM.