Skip to content

Instantly share code, notes, and snippets.

@chrisyip
Created November 29, 2011 07:25
Show Gist options
  • 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