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
There is the requested simple example:
HTML:
Text
JS:
$('#css_toggle').click(function () { if ($("link[id='styles']").attr('href') == 'path_to_your_style_1'){ $("link[id='styles']").attr('href', 'path_to_your_style_2'); } else { $("link[id='styles']").attr('href', 'path_to_your_style_1'); } });