Remove stylesheet
To remove a stylesheet simply give it an id
<link href=”cssFolder/sheet2.css” rel=”stylesheet” type=”text/css” id=”sheet2″>
And insert the following script just before </body> tag
<script type="text/javascript">
$(document).ready(function () {
jQuery('#sheet2').remove();
});
</script>
Demo
Add stylesheet
To Add a stylesheet insert the following script just before </body> tag
<script type="text/javascript">
$(document).ready(function () {
$('head').append('<link href="cssFolder/sheet2.css" rel="stylesheet" id="banSheet" />');
});
</script>
Although i have used document ready in the snippets above i have used the click function in the 2 demo files just to give you an idea of what can be done.
