Skip to content

Instantly share code, notes, and snippets.

@chrisyip
Created November 29, 2011 07:25
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save chrisyip/1403858 to your computer and use it in GitHub Desktop.
Save chrisyip/1403858 to your computer and use it in GitHub Desktop.
Dynamically add CSS link or rule to DOM w/ pure JavaScript
@clemlatz
Copy link

Line 4 should be link.href = url;

@kdssoftware
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment