You can use an alternative way: var el = $('<style type="text/css"></style>').appendTo('head').attr({ media: media, id: id, type: 'text/css' })[0]; if(el.styleSheet !== undefined && el.styleSheet.cssText !== undefined) { // IE el.styleSheet.cssText = css; } else { el.appendChild(document.createTextNode(css)); // Others //el.innerHTML = css; };
- [jQuery] .append() into style element causes error in IE on... Ant
- [jQuery] Re: .append() into style element causes error... Ricardo Tomasi
- [jQuery] Re: .append() into style element causes e... Ant
- [jQuery] Re: .append() into style element caus... Ricardo Tomasi
- [jQuery] Re: .append() into style element ... Ant
- [jQuery] Re: .append() into style ele... KidsKilla
- [jQuery] Re: .append() into style element ... Spot