[jQuery] Re: .css("border-color") returning undefined

2007-07-15 Thread Benjamin Sterling

Jazzle,
I believe you need to do:

.css('borderColor');

Let me know if that works for you.

On 7/15/07, jazzle <[EMAIL PROTECTED]> wrote:




Hi guys and gals,
.css("border-color")
is returning undefined.

The element in question has 2 css classes, both of which have it set.

HTML:


CSS:
.result { border: 2px dotted #fb0;  }
.success{ border-color: #33cc33; }

Can I get the correct border-color with jQuery?
--
View this message in context:
http://www.nabble.com/.css%28%22border-color%22%29-returning-undefined-tf4082154s15494.html#a11602408
Sent from the JQuery mailing list archive at Nabble.com.





--
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com


[jQuery] Re: .css("border-color") returning undefined

2007-07-15 Thread jazzle

I thought that at first, but that's not the problem.
Proven by the fact that I use
.css("background-color");
successfully.


On Jul 15, 3:51 pm, "Benjamin Sterling"
<[EMAIL PROTECTED]> wrote:
> Jazzle,
> I believe you need to do:
>
> .css('borderColor');
>
> Let me know if that works for you.
>
> On 7/15/07, jazzle <[EMAIL PROTECTED]> wrote:
>
>
> > Hi guys and gals,
> > .css("border-color")
> > is returning undefined.
>
> > The element in question has 2 css classes, both of which have it set.
>
> > HTML:
> > 
>
> > CSS:
> > .result { border: 2px dotted #fb0;  }
> > .success{ border-color: #33cc33; }
>
> > Can I get the correct border-color with jQuery?
> > --
> > View this message in context:
> >http://www.nabble.com/.css%28%22border-color%22%29-returning-undefine...
> > Sent from the JQuery mailing list archive at Nabble.com.
>
> --
> Benjamin Sterlinghttp://www.KenzoMedia.comhttp://www.KenzoHosting.com



[jQuery] Re: .css("border-color") returning undefined

2007-07-15 Thread jazzle

I'm currently using the following, but as you can see I have commented
out the end of the line that's causing me problems.

$('.result').each(function() {
var origBorderColor = "black";//$(this).css("border-color");
var origBackgroundColor = $(this).css("background-color");

$(this)
.animate({opacity: 1.0}, 1000) // wait 1 sec
.animate({borderColor: '#ff', backgroundColor: '#cc'})
.animate({borderColor: '#00', backgroundColor: '#ff'}, 
250)
.animate({borderColor: '#ff', backgroundColor: '#cc'}, 
250)
.animate({opacity: 1.0}, 3000) // wait 3 sec
.animate({borderColor: origBorderColor, backgroundColor:
origBackgroundColor});
});



On Jul 15, 3:51 pm, "Benjamin Sterling"
<[EMAIL PROTECTED]> wrote:
> Jazzle,
> I believe you need to do:
>
> .css('borderColor');
>
> Let me know if that works for you.
>
> On 7/15/07, jazzle <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hi guys and gals,
> > .css("border-color")
> > is returning undefined.
>
> > The element in question has 2 css classes, both of which have it set.
>
> > HTML:
> > 
>
> > CSS:
> > .result { border: 2px dotted #fb0;  }
> > .success{ border-color: #33cc33; }
>
> > Can I get the correct border-color with jQuery?
> > --
> > View this message in context:
> >http://www.nabble.com/.css%28%22border-color%22%29-returning-undefine...
> > Sent from the JQuery mailing list archive at Nabble.com.
>
> --
> Benjamin Sterlinghttp://www.KenzoMedia.comhttp://www.KenzoHosting.com



[jQuery] Re: .css("border-color") returning undefined

2007-07-15 Thread jazzle

I still need some help with this - can anyone help me?



[jQuery] Re: .css("border-color") returning undefined

2007-07-15 Thread Karl Rudd


You can't animate a change in color via using jQuery (core), unless
something has changed in 1.1.3 that I haven't noticed.

You could have a look at the Interface plugin, which does handle this:
http://interface.eyecon.ro/

Karl Rudd

On 7/16/07, jazzle <[EMAIL PROTECTED]> wrote:


I still need some help with this - can anyone help me?


[jQuery] Re: .css("border-color") returning undefined

2007-07-15 Thread Karl Swedberg

On 7/16/07, jazzle <[EMAIL PROTECTED]> wrote:


I still need some help with this - can anyone help me?


Sorry for the delay, Jazzle. The discussion list slows down quite a  
bit during the weekends, I've noticed, as devs try to catch their  
breath, maybe take a walk outside, get reacquainted with a long-lost  
spouse or child, eat some protein, and so on. ;-)



On Jul 15, 2007, at 9:17 PM, Karl Rudd wrote:


You can't animate a change in color via using jQuery (core), unless
something has changed in 1.1.3 that I haven't noticed.


That's still the case (still no feature for animating color in jQuery  
core).



You could have a look at the Interface plugin, which does handle this:
http://interface.eyecon.ro/


Good call. The Interface plugin suite has an animation module that  
extends (or overwrites; can't remember which) the .animate() method.


Take a look at this test page for an example:

http://book.learningjquery.com/2509_10_code/iplugin.html

Click on the "Extended Animate" heading to slide down the example.  
Then click the "Trigger" button to see the effect.


--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com




[jQuery] Re: .css("border-color") returning undefined

2007-07-16 Thread jazzle

I am already using that plugin, but that isn't where my problem lies.


On Jul 16, 2:32 am, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> > On 7/16/07, jazzle <[EMAIL PROTECTED]> wrote:
>
> >> I still need some help with this - can anyone help me?
>
> Sorry for the delay, Jazzle. The discussion list slows down quite a
> bit during the weekends, I've noticed, as devs try to catch their
> breath, maybe take a walk outside, get reacquainted with a long-lost
> spouse or child, eat some protein, and so on. ;-)
>
> On Jul 15, 2007, at 9:17 PM, Karl Rudd wrote:
>
>
>
> > You can't animate a change in color via using jQuery (core), unless
> > something has changed in 1.1.3 that I haven't noticed.
>
> That's still the case (still no feature for animating color in jQuery
> core).
>
> > You could have a look at the Interface plugin, which does handle this:
> >http://interface.eyecon.ro/
>
> Good call. The Interface plugin suite has an animation module that
> extends (or overwrites; can't remember which) the .animate() method.
>
> Take a look at this test page for an example:
>
>http://book.learningjquery.com/2509_10_code/iplugin.html
>
> Click on the "Extended Animate" heading to slide down the example.
> Then click the "Trigger" button to see the effect.
>
> --Karl
> _
> Karl Swedbergwww.englishrules.comwww.learningjquery.com



[jQuery] Re: .css("border-color") returning undefined

2007-07-16 Thread Karl Rudd


In that case, what version of jQuery are you using? Something may have
broken in the change from 1.1.2 to 1.1.3.

Karl Rudd

On 7/16/07, jazzle <[EMAIL PROTECTED]> wrote:


I am already using that plugin, but that isn't where my problem lies.


On Jul 16, 2:32 am, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> > On 7/16/07, jazzle <[EMAIL PROTECTED]> wrote:
>
> >> I still need some help with this - can anyone help me?
>
> Sorry for the delay, Jazzle. The discussion list slows down quite a
> bit during the weekends, I've noticed, as devs try to catch their
> breath, maybe take a walk outside, get reacquainted with a long-lost
> spouse or child, eat some protein, and so on. ;-)
>
> On Jul 15, 2007, at 9:17 PM, Karl Rudd wrote:
>
>
>
> > You can't animate a change in color via using jQuery (core), unless
> > something has changed in 1.1.3 that I haven't noticed.
>
> That's still the case (still no feature for animating color in jQuery
> core).
>
> > You could have a look at the Interface plugin, which does handle this:
> >http://interface.eyecon.ro/
>
> Good call. The Interface plugin suite has an animation module that
> extends (or overwrites; can't remember which) the .animate() method.
>
> Take a look at this test page for an example:
>
>http://book.learningjquery.com/2509_10_code/iplugin.html
>
> Click on the "Extended Animate" heading to slide down the example.
> Then click the "Trigger" button to see the effect.
>
> --Karl
> _
> Karl Swedbergwww.englishrules.comwww.learningjquery.com




[jQuery] Re: .css("border-color") returning undefined

2007-07-16 Thread Klaus Hartl


Karl Swedberg wrote:

You could have a look at the Interface plugin, which does handle this:
http://interface.eyecon.ro/


Good call. The Interface plugin suite has an animation module that 
extends (or overwrites; can't remember which) the .animate() method. 


It overwrites unfortunately. One has to be aware of that! I had some 
problems with that and renamed all occurences to ifxAnimate (which would 
have been better pracice in my eyes anyway).




--Klaus


[jQuery] Re: .css("border-color") returning undefined

2007-07-16 Thread jazzle


The latest: 1.1.3.1
And the latest Interface download too.
If it is just a bug with the latest jQ, it would make a lot of sense, but
obviously be a bit annoying.
Difficult for me to test from here (work), so may come back to this thread
later this week.


Karl Rudd wrote:
> 
> In that case, what version of jQuery are you using? Something may have
> broken in the change from 1.1.2 to 1.1.3.
> ...
> 

-- 
View this message in context: 
http://www.nabble.com/.css%28%22border-color%22%29-returning-undefined-tf4082154s15494.html#a11614729
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: .css("border-color") returning undefined

2007-07-16 Thread Karl Swedberg

Hi Jazzle,

This one animates the border just fine, too, with jQuery version  
1.1.3.1 and, as far as I know, the latest Interface:


http://book.learningjquery.com/2509_10_code/iplugin.1131.html

However, if I type$('#animationbox').css('borderColor') in Firebug  
console BEFORE I trigger the animation, it returns nothing. If I do  
so AFTERWARDS, it returns: "rgb(204, 204, 204) rgb(204, 204, 204) rgb 
(204, 204, 204) rgb(204, 204, 204)", which corresponds to the rgb  
values of border-top, border-right, etc.


Unfortunately, I don't have time right now to look at what's going on  
in the Interface .animate() method, which is where I suspect the  
problem lies. I'm not sure I'd understand it if I did look at it.  
Hopefully someone else can look into this for you. Or I'll take a  
peek when I get a chance.



--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Jul 16, 2007, at 8:52 AM, jazzle wrote:




The latest: 1.1.3.1
And the latest Interface download too.
If it is just a bug with the latest jQ, it would make a lot of  
sense, but

obviously be a bit annoying.
Difficult for me to test from here (work), so may come back to this  
thread

later this week.


Karl Rudd wrote:


In that case, what version of jQuery are you using? Something may  
have

broken in the change from 1.1.2 to 1.1.3.
...



--
View this message in context: http://www.nabble.com/.css%28% 
22border-color%22%29-returning-undefined- 
tf4082154s15494.html#a11614729

Sent from the JQuery mailing list archive at Nabble.com.





[jQuery] Re: .css("border-color") returning undefined

2007-07-16 Thread george.gsgd

$('#animationbox').css('borderColor') looks at the style property of
the object not the css in the document, so if it's only in your css
you get no value.

To get your desired effect you either need to initialise it with
javascript
$('#animationbox').css('borderColor' '#444')
or set it specifically to the element within the html
blah

Hope that makes sense

On Jul 16, 2:57 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> However, if I type$('#animationbox').css('borderColor') in Firebug
> console BEFORE I trigger the animation, it returns nothing. If I do
> so AFTERWARDS, it returns: "rgb(204, 204, 204) rgb(204, 204, 204) rgb
> (204, 204, 204) rgb(204, 204, 204)", which corresponds to the rgb
> values of border-top, border-right, etc.



[jQuery] Re: .css("border-color") returning undefined

2007-07-16 Thread jazzle


Are you sure?
The backgroundColor is returned okay...


george.gsgd wrote:
> 
> $('#animationbox').css('borderColor') looks at the style property of the
> object not the css in the document, so if it's only in your css you get no
> value.
> ...
> 

-- 
View this message in context: 
http://www.nabble.com/.css%28%22border-color%22%29-returning-undefined-tf4082154s15494.html#a11626448
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: .css("border-color") returning undefined

2007-07-18 Thread george.gsgd

I think backgroundColor works differently as it always has a property,
regardless of whether you set it or not.

On Jul 16, 6:51 pm, jazzle <[EMAIL PROTECTED]> wrote:
> Are you sure?
> The backgroundColor is returned okay...
>
> george.gsgd wrote:
>
> > $('#animationbox').css('borderColor') looks at the style property of the
> > object not the css in the document, so if it's only in your css you get no
> > value.
> > ...
>
> --
> View this message in 
> context:http://www.nabble.com/.css%28%22border-color%22%29-returning-undefine...
> Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: .css("border-color") returning undefined

2007-07-18 Thread jazzle


aren't borders black unless set otherwise?
(i.e. the same behaviour, set by the browser's defaults)


george.gsgd wrote:
> 
> I think backgroundColor works differently as it always has a property,
> regardless of whether you set it or not.
> 
> On Jul 16, 6:51 pm, jazzle <[EMAIL PROTECTED]> wrote:
>> Are you sure?
>> The backgroundColor is returned okay...
>>
>> george.gsgd wrote:
>> > $('#animationbox').css('borderColor') looks at the style property of
>> the
>> > object not the css in the document, so if it's only in your css you get
>> no
>> > value.
>> > ...
> 

-- 
View this message in context: 
http://www.nabble.com/.css%28%22border-color%22%29-returning-undefined-tf4082154s15494.html#a11665946
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: .css("border-color") returning undefined

2007-07-18 Thread Dave Methvin

The name border-color is mostly a shortcut for *setting* the color of
all four borders at once.
I have never trusted the shortcut properties, I don't think they work
consistently across browsers and it seemed too difficult to make
jQuery normalize them. For widths I always get the width of each side
(border-left-width etc.) individually.

For example, what should the browser return as border-color for a div
with a style of "border-left: 2px solid #ccc; border-right: 4px inset
#366"? I think in some browsers and some cases it returns the values
for top, right, bottom, left separated by space, but .animate()
probably wont' know what to do with that.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery (English)" group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---