document.styleSheets is used with an index, but what If I want to use stylesheet.insertRule with a specific CSS file ?
I know the file\'s name, which is
Why so complicated? You can get a specific document stylesheet by ID or URL without looping through all the stylesheets in the document: var mysheet = $('link#id')[0].sheet; ... or ... var mysheet = $('link[href="/css/style.css"]')[0].sheet;
var mysheet = $('link#id')[0].sheet;
var mysheet = $('link[href="/css/style.css"]')[0].sheet;