Remove obsolete stylesheet helper

This commit is contained in:
Jermolene 2014-02-08 09:29:11 +00:00
parent 828fc9dcd0
commit b26a32b93a
1 changed files with 0 additions and 21 deletions

View File

@ -60,27 +60,6 @@ exports.toggleClass = function(el,className,status) {
}
};
exports.applyStyleSheet = function(id,css) {
var el = document.getElementById(id);
if(document.createStyleSheet) { // Older versions of IE
if(el) {
el.parentNode.removeChild(el);
}
document.getElementsByTagName("head")[0].insertAdjacentHTML("beforeEnd",
'&nbsp;<style id="' + id + '" type="text/css">' + css + '</style>'); // fails without &nbsp;
} else { // Modern browsers
if(el) {
el.replaceChild(document.createTextNode(css), el.firstChild);
} else {
el = document.createElement("style");
el.type = "text/css";
el.id = id;
el.appendChild(document.createTextNode(css));
document.getElementsByTagName("head")[0].appendChild(el);
}
}
};
/*
Get the scroll position of the viewport
Returns: