Reputation: 1155
In my table I am using below mentioned tr and giving border using style.
<tr id="test" name="test1" style="border: 2px solid !important">
While using jquery
$(this).css('border-bottom')
returns appropriate values in chrome but not in mozilla and IE. I tried many shorthand properties as well such as borderStyle, borderBottomWidth, borderBottomColor but no success.
Please tell me what I am doing wrong.
Upvotes: 3
Views: 58
Reputation: 3308
border: 2px solid #000;
is interpreted to multiple, specific properties. You need to target a specific css property, for example: border-bottom-width
$(document).ready(function(){
var border1 = $('#test').css('border-bottom-width');
alert(border1);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table>
<tr>
<td id="test" style="border: 2px solid #000 !important;">sdsds</td>
</tr>
</table>
Upvotes: 3