Skip to content

Instantly share code, notes, and snippets.

@lsmith
Created March 12, 2012 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lsmith/2024517 to your computer and use it in GitHub Desktop.
Save lsmith/2024517 to your computer and use it in GitHub Desktop.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>test page</title>
<link type="text/css" rel="stylesheet" href="http://yui.yahooapis.com/3.4.1/build/cssreset/cssreset-min.css" id="changeme">
</head>
<body>
<h1>This is a heading</h1>
<ul>
<li>This is</li>
<li>an unordered</li>
<li>list</li>
</ul>
<button id="go">Change the stylesheet</button>
<script src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script>
<script>
YUI().use('node', function (Y) {
Y.one('#go').on('click', function () {
Y.one('#changeme').set('href', 'http://yui.yahooapis.com/3.4.1/build/cssbase/cssbase-min.css');
});
});
</script>
</body> ​
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment