Disable CSS stylesheet with JavaScript

Disable CSS stylesheet with JavaScript

Use the following code to disable a style sheet using jQuery.
var styleSheets = document.styleSheets;
var href = 'http://www.website.com/css/style.css';
for (var i = 0; i < styleSheets.length; i++) {
if (styleSheets[i].href == href) {
styleSheets[i].disabled = true;
break;
}
}