Answer the question
In order to leave comments, you need to log in
Until when to use createStyleSheet()? In which version of Internet Explorer does a simple hyperlink to a style file work?
As you know, in earlier versions of Internet Explorer, you had to use the proprietary createStyleSheet( ) method to embed a style sheet in a document. Some of these versions are still in use, which is why websites have to use a conditional statement like the following to insert styles dynamically (performed by javascript):
if (document.createStyleSheet) {
document.createStyleSheet(sheetPath); // Internet Explorer
} else {
$('head').append('<link rel="stylesheet" type="text/css" href="' + sheetPath + '" />');
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question