My code:
<head>
<style>
#doit{
border:5px solid blue;
color:white
}
</style>
</head>
<button id="doit">Click me </button>
<script>
$('#doit').click(function(event){
console.log ($(event.currentTarget).css('border'));
var x=window.getComputedStyle(event.currentTarget);
console.log(x.border);
});
</script>
It is just impossible to get the border value in Mozilla and IE11. Chrome works fine!! To get things more strange if I change border
with color
everything is fine. How may I solve this problem? Neither borderWidth
works... However, I want to get border's value. Please, help!