Brandon Aaron schrieb:
> It is a first draft and lacks a lot but thought I
> would share anyways.
Thank you for share this.
Can you write a simple Demo what i must do to write
body{
background:black;
}
Ad sis ever at last Style (rel) in head? I will use this to overwrite
existing Style.
> jQuery.style = function(selector, declaration) {
> if (!jQuery.style.sheet) jQuery.style.createSheet();
> var s = jQuery.style.sheet;
> var n = jQuery.style.node;
>
> if ($.browser.safari) {
> n.appendChild( document.createTextNode(selector+" { "+declaration+" }") );
> } else if (s && s.insertRule) {
> s.insertRule(selector+" { "+declaration+" }", s.cssRules.length);
> } else if (s && s.addRule) {
> s.addRule(selector, declaration, s.rules.length);
> }
> };
>
> jQuery.extend(jQuery.style, {
> sheet: null,
> node: null,
>
> createSheet: function() {
> var style = document.createElement('style');
> style.setAttribute('type', 'text/css');
> style.setAttribute('media', 'screen');
> jQuery.style.node =
> document.getElementsByTagName('head')[0].appendChild(style);
> jQuery.style.sheet = document.styleSheets[document.styleSheets.length-1];
> }
> });
>
> --
> Brandon Aaron
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
--
Viele Grüße, Olaf
-------------------------------
[EMAIL PROTECTED]
http://olaf-bosch.de
www.akitafreund.de
-------------------------------
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/