http://trac.tiddlywiki.org/changeset/12142
MartinBudden
2010-05-17 07:17:29 -0700 (Mon, 17 May 2010)
44
TiddlyWiki - improved IE stylesheet handling
---------------
U Trunk/core/jquery/plugins/jQuery.twStylesheet.js
---------------
Modified: Trunk/core/jquery/plugins/jQuery.twStylesheet.js
===================================================================
--- Trunk/core/jquery/plugins/jQuery.twStylesheet.js 2010-05-17 12:21:49 UTC
(rev 12141)
+++ Trunk/core/jquery/plugins/jQuery.twStylesheet.js 2010-05-17 14:17:29 UTC
(rev 12142)
@@ -31,10 +31,11 @@
var el = doc.getElementById(id);
if(doc.createStyleSheet) { // IE-specific handling
if(el) {
- el.parentNode.removeChild(el);
+ el.cssText = css;
+ } else {
+
doc.getElementsByTagName("head")[0].insertAdjacentHTML("beforeEnd",
+ ' <style id="' + id + '" type="text/css">'
+ css + '</style>'); // fails without
}
-
doc.getElementsByTagName("head")[0].insertAdjacentHTML("beforeEnd",
- ' <style id="' + id + '" type="text/css">' + css +
'</style>'); // fails without
} else { // modern browsers
if(el) {
el.replaceChild(doc.createTextNode(css), el.firstChild);
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/tiddlywikidev?hl=en.