But doesn't this work because it done in document.ready?

I mean, add a button to call a function to do injection upon command.

Ok, I got it to work by using .evalScript()

<script>
function applyStyle() {
   var s = $('#juserCSS').text();
   $('head').append('<style type="text/css">'+s+'</
style>').evalScripts();
}
</script>

hmmmm, didn't I see something in 1.1.4 about evalScripts() being
deprecated?   Ok, under 1.1.4 it would of worked for me the first
time.

Great!

Thanks fellas!

--
HLS


On Aug 25, 2:07 am, "Erik Beeson" <[EMAIL PROTECTED]> wrote:
> Right, I just noticed that I forgot to put head in quotes. Here's a
> little test page:
>
> http://erikandcolleen.com/erik/projects/jquery/cssinject/cssinject.html
>
> Works in FF2/Mac, Safari 2.0.4, IE6.
>
> --Erik
>
> On 8/24/07, Pops <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Aug 25, 1:31 am, "Erik Beeson" <[EMAIL PROTECTED]> wrote:
> > > This seems to work in FF2/Mac:
>
> > > var myCss = 'p { border: 2px solid #faa; }';
> > > $(head).append('<style type="text/css">' + myCss + '</style>');
>
> > I tried something like this, but it didn't seem to take.
>
> > I drifted into doing something with the <link> in DOM that I see with
> > FireBug.  I figure if Firebug allows you edit it, you can program it
> > too. I figured I can change what wast imported by overwring it with
> > the content in the textarea.
>
> > Anyway if it worked for you, it should work for me. Lets try it.... It
> > didn''t take, but I do see it in DOM.  Does it need to be "eval()"?
>
> > --
> > HLS

Reply via email to