Side navigation
#9839 closed bug (invalid)
Opened July 15, 2011 05:54PM UTC
Closed July 15, 2011 09:09PM UTC
Returning an empty string when using .css('border')
| Reported by: | edmandie.samonte@gmail.com | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 1.next |
| Component: | css | Version: | 1.6.2 |
| Keywords: | Cc: | ||
| Blocked by: | Blocking: |
Description
Here is the code I used
<script type="text/javascript">
$(document).ready(function(){
$('h1').css({'border':'1px solid #ccc'});
console.log($('h1').css('border'));
});
</script>
<h1>Some Message</h1>
And the output using alert or using firebug is:
''(an empty string)''
In IE9 ''border-width'' is detected and not the whole border property.
Attachments (0)
Change History (1)
Changed July 15, 2011 09:09PM UTC by comment:1
| component: | unfiled → css |
|---|---|
| priority: | undecided → low |
| resolution: | → invalid |
| status: | new → closed |
According to: http://api.jquery.com/css ....
''Shorthand CSS properties (e.g. margin, background, border) are not supported. For example, if you want to retrieve the rendered margin, use: $(elem).css('marginTop') and $(elem).css('marginRight'), and so on.''