/ Published in: jQuery
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<!-- HTML --> <a href="#" class="styleswitch" rel="dark.css">Dark</a> <a href="#" class=" styleswitch " rel="light.css">Light</a> //JavaScript <script type="text/javascript"> $(".styleswitch").click(function() { $('link[rel=stylesheet]').attr('href' , $(this).attr('rel')); }); </script>
URL: http://sixrevisions.com/javascript/10-easy-jquery-tricks-for-designers/