Return to Snippet

Revision: 19364
at October 22, 2009 09:03 by stancox


Initial Code
<!-- 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>

Initial URL
http://sixrevisions.com/javascript/10-easy-jquery-tricks-for-designers/

Initial Description

                                

Initial Title
CSS Style Switcher

Initial Tags
css

Initial Language
jQuery