Alexandre,

this page http://www.quirksmode.org/dom/getstyles.html is probably a better
resource for you to test.

two-thirds of the3 way down the page, is an input area where you can try
out...border...border-width....border-bottom-width etc....and to see the
results...

as you will see, from this test, jQuery behaves exactly the same as
traditional javascript notation in retrieving these values...

hope this helps

2008/4/25 Alexandre Plennevaux <[EMAIL PROTECTED]>:

> hi Giuliano and thanks for holding on :-)
>
> I understand your point but the infos published on the W3C website seem to
> mean that border as a shorthand is retrievable:
>
> http://www.w3schools.com/htmldom/prop_style_border.asp
>
>
>
>
> On Thu, Apr 24, 2008 at 11:58 PM, Giuliano Marcangelo <
> [EMAIL PROTECTED]> wrote:
>
>> Dear Alexandre,
>>
>> if we take #id{ border: 1px solid #FF0000;} , border is shorthand
>> (convenience method) for border-top,border-right,border-bottom,border-left /
>> width - style - color, all in all twelve combinations.........if it would
>> make sense for $('#id').css('border-color'); return #FF0000........
>>
>> what would be the expected returned result for the following,
>>
>> #id{ border: 1px solid #FF0000;}
>> #id{ border-bottom-color:#FFFF00}
>>
>> ........?????
>>
>>
>>
>> 2008/4/24 Alexandre Plennevaux <[EMAIL PROTECTED]>:
>>
>>> i know all this Guiliano, and according to what i've googled about
>>> javascript style.border, it can retrieve the value if that value has been
>>> set before, which is the case here.
>>>
>>> in any case, if in the css, you 've set  #id{ border: 1px solid
>>> #FF0000;}  then it would only make sense that  $('#id').css('border-color');
>>> return #FF0000 yet it does not. If it is not a bug, it's definitely a place
>>> for improvement.
>>>
>>>
>>>
>>>
>>> On Thu, Apr 24, 2008 at 5:41 PM, Giuliano Marcangelo <
>>> [EMAIL PROTECTED]> wrote:
>>>
>>>> Alexandre,
>>>>
>>>> to access the border properties, you have to be more specific..........
>>>>
>>>> border has four sides, top - right- bottom - left
>>>> .
>>>> and also style, color and width properties....
>>>>
>>>> so to get your required css....you need to access (as an example)
>>>>
>>>> border-bottom-style  ..... or
>>>> border-bottom-color ..... or
>>>> border-bottom-width
>>>>
>>>> jQuery is good , but does not possess a crystal ball.......
>>>>
>>>> if you think about the border ( and also padding / margin) properties,
>>>> each border can be a different color/width and style to each of its
>>>> neighbours, so you have to be explicit in your request
>>>>
>>>> hope this helps :-)
>>>>
>>>> 2008/4/24 Alexandre Plennevaux <[EMAIL PROTECTED]>:
>>>>
>>>> I wonder why this doesn't work, either it's a but or a flaw in the
>>>>> documentation:
>>>>>
>>>>>
>>>>>
>>>>> consider this code:
>>>>>
>>>>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
>>>>> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>>>>> <html>
>>>>>     <head>
>>>>>         <style type="text/css">
>>>>>             h1 {
>>>>>                 background-color: #FF00FF;
>>>>>                 color: white;
>>>>>                 border: 1px solid red;
>>>>>             }
>>>>>         </style>
>>>>>         <script type="text/javascript"
>>>>> src="../jquery.latest.js"></script>
>>>>>         <script type="text/javascript">
>>>>>             $(document).ready(function(){
>>>>>                 var mycss = $('h1').css('border');
>>>>>                 alert("hi : " + mycss );
>>>>>             });
>>>>>
>>>>>         </script>
>>>>>     </head>
>>>>>     <body>
>>>>>             <h1>hello world</h1>
>>>>>     </body>
>>>>> </html>
>>>>> ...
>>>>>
>>>>>
>>>>> mycss returns undefined instead of  '1px solid red'
>>>>>
>>>>>
>>>>> Unless there is a good reason that i'm unaware of, this seems like a
>>>>> bug to me, no ?
>>>>>
>>>>> Thanks
>>>>>
>>>>> Alexandre
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Alexandre Plennevaux
>>> LAb[au]
>>>
>>> http://www.lab-au.com
>>
>>
>>
>
>
> --
> Alexandre Plennevaux
> LAb[au]
>
> http://www.lab-au.com
>

Reply via email to