I am trying to add in a very simple method of switching between 2 stylesheets.
I can get the stylesheet to fire on click but not able to toggle it back to its origin
A better, and more reliable, solution would be to use a single stylesheet and alternate the styling by making the rules depend on a class on the body. You can then just toggle that class when needed, something like this:
$('#css_toggle').click(function() {
$('body').toggleClass('default highlight');
});
body.default .sq {
border: 1px solid #C00;
}
body.highlight .sq {
background-color: #CC0;
border: 2px dotted #C00;
}
.sq {
margin: 10px 0 0;
}
Foo