[jQuery] Re: I'm going nutz...
Thanks, I don't know why I tried to switch and use attr(). Previously I had been using css() Everything is perfect now. Allex -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, April 06, 2007 2:56 PM To: jQuery (English) Subject: [jQuery] Re: I'm going nutz... No, IE doesn't treat styles as simple text, the way FF does (just like $(' h1 {color: black}') works in FF but not in IE. The style object is read-only and you can only set its members. You should use $(...).css(...) Danny Wachsstock On Apr 6, 3:27 pm, "Smith, Allex" <[EMAIL PROTECTED]> wrote: > It's not applying the style... I'm using the dump() plugin as well as > simply alerting it to the screen. > > Allex > > -Original Message- > From: jquery-en@googlegroups.com > > [mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews > Sent: Friday, April 06, 2007 12:25 PM > To: jquery-en@googlegroups.com > Subject: [jQuery] Re: I'm going nutz... > > Are you talking about viewing source in IE vs FF? Because if > you perform an action with jQuery, then view source in IE, you'll > NEVER see the changes in the code. However, using the "View Generated > Source" option in FF's developer toolbar allows you to see changes > made using javascript. > > Or are you saying that it's not even applying the style? > > > > From: jquery-en@googlegroups.com > [mailto:[EMAIL PROTECTED] On Behalf Of Smith, Allex > Sent: Friday, April 06, 2007 1:57 PM > To: jquery-en@googlegroups.com > Subject: [jQuery] I'm going nutz... > > Test > > $('#mytest').attr({style:"width:200px;"}); > > returns > > Test in FF2 > > Test in IE6 > > I must be going mad. > > Any suggestions as to where I might be going wrong?
[jQuery] Re: I'm going nutz...
No, IE doesn't treat styles as simple text, the way FF does (just like $(' h1 {color: black}') works in FF but not in IE. The style object is read-only and you can only set its members. You should use $(...).css(...) Danny Wachsstock On Apr 6, 3:27 pm, "Smith, Allex" <[EMAIL PROTECTED]> wrote: > It's not applying the style... I'm using the dump() plugin as well as > simply alerting it to the screen. > > Allex > > -Original Message- > From: jquery-en@googlegroups.com > > [mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews > Sent: Friday, April 06, 2007 12:25 PM > To: jquery-en@googlegroups.com > Subject: [jQuery] Re: I'm going nutz... > > Are you talking about viewing source in IE vs FF? Because if you > perform an action with jQuery, then view source in IE, you'll NEVER see > the changes in the code. However, using the "View Generated Source" > option in FF's developer toolbar allows you to see changes made using > javascript. > > Or are you saying that it's not even applying the style? > > > > From: jquery-en@googlegroups.com > [mailto:[EMAIL PROTECTED] On Behalf Of Smith, Allex > Sent: Friday, April 06, 2007 1:57 PM > To: jquery-en@googlegroups.com > Subject: [jQuery] I'm going nutz... > > Test > > $('#mytest').attr({style:"width:200px;"}); > > returns > > Test in FF2 > > Test in IE6 > > I must be going mad. > > Any suggestions as to where I might be going wrong?
[jQuery] Re: I'm going nutz...
Sorry... fat fingered your name Glen. Allex -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Smith, Allex Sent: Friday, April 06, 2007 12:19 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: I'm going nutz... Thanks Glin... I'll give it a whirl. Allex -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Glen Lipka Sent: Friday, April 06, 2007 12:07 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: I'm going nutz... On 4/6/07, Smith, Allex <[EMAIL PROTECTED]> wrote: Test $('#mytest').attr({style:"width:200px;"}); returns Test in FF2 Test in IE6 I must be going mad. Any suggestions as to where I might be going wrong? or if you need multiple: $("#mytest'").css({ color: "red", width: "200px" });
[jQuery] Re: I'm going nutz...
It's not applying the style... I'm using the dump() plugin as well as simply alerting it to the screen. Allex -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews Sent: Friday, April 06, 2007 12:25 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: I'm going nutz... Are you talking about viewing source in IE vs FF? Because if you perform an action with jQuery, then view source in IE, you'll NEVER see the changes in the code. However, using the "View Generated Source" option in FF's developer toolbar allows you to see changes made using javascript. Or are you saying that it's not even applying the style? From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Smith, Allex Sent: Friday, April 06, 2007 1:57 PM To: jquery-en@googlegroups.com Subject: [jQuery] I'm going nutz... Test $('#mytest').attr({style:"width:200px;"}); returns Test in FF2 Test in IE6 I must be going mad. Any suggestions as to where I might be going wrong?
[jQuery] Re: I'm going nutz...
Are you talking about viewing source in IE vs FF? Because if you perform an action with jQuery, then view source in IE, you'll NEVER see the changes in the code. However, using the "View Generated Source" option in FF's developer toolbar allows you to see changes made using javascript. Or are you saying that it's not even applying the style? _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Smith, Allex Sent: Friday, April 06, 2007 1:57 PM To: jquery-en@googlegroups.com Subject: [jQuery] I'm going nutz... Test $('#mytest').attr({style:"width:200px;"}); returns Test in FF2 Test in IE6 I must be going mad. Any suggestions as to where I might be going wrong?
[jQuery] Re: I'm going nutz...
Thanks Glin... I'll give it a whirl. Allex -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Glen Lipka Sent: Friday, April 06, 2007 12:07 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: I'm going nutz... On 4/6/07, Smith, Allex <[EMAIL PROTECTED]> wrote: Test $('#mytest').attr({style:"width:200px;"}); returns Test in FF2 Test in IE6 I must be going mad. Any suggestions as to where I might be going wrong? or if you need multiple: $("#mytest'").css({ color: "red", width: "200px" });
[jQuery] Re: I'm going nutz...
On 4/6/07, Steve Blades <[EMAIL PROTECTED]> wrote: I thought it was $('#mytest').css({width:"200px"}); to set a style attribute? The curly braces depend on if you want to set an array or a single one. Check in www.jquery.com/api under CSS. Its got a bunch of good examples. Glen
[jQuery] Re: I'm going nutz...
I thought it was $('#mytest').css({width:"200px"}); to set a style attribute? -- Steve "Cutter" Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer _ http://blog.cutterscrossing.com --- The Past is a Memory The Future a Dream But Today is a Gift That's why they call it The Present
[jQuery] Re: I'm going nutz...
On 4/6/07, Smith, Allex <[EMAIL PROTECTED]> wrote: Test $('#mytest').attr({style:"width:200px;"}); returns Test in FF2 Test in IE6 I must be going mad. Any suggestions as to where I might be going wrong? or if you need multiple: $("#mytest'").css({ color: "red", width: "200px" });
[jQuery] Re: I'm going nutz...
On 4/6/07, Smith, Allex <[EMAIL PROTECTED]> wrote: Test $('#mytest').attr({style:"width:200px;"}); returns Test in FF2 Test in IE6 I must be going mad. Any suggestions as to where I might be going wrong? Why not do $("#mytest").css("width","200px"); Glen