JSFiddle - React, Tailwind, and code Playground
HTML
<div id = "SelectedDiv"></div>
CSS
div{
border-radius:30px;
background-color:black;
display:block;
width:300px;
height:300px;
}
JavaScript
(function($){
$.fn.getStyleObject = function(){
var dom = this.get(0);
var style;
var returns = {};
if(window.getComputedStyle){
var camelize = function(a,b){
return b.toUpperCase();
}
style = window.getComputedStyle(dom, null);
for(var i=0;i<style.length;i++){
var prop = style[i];
var camel = prop.replace(/\-([a-z])/g, camelize);
var val = style.getPropertyValue(prop);
returns[camel] = val;
}
return returns;
}
if(dom.currentStyle){
style = dom.currentStyle;
for(var prop in style){
returns[prop] = style[prop];
}
return returns;
}
return this.css();
}
})(jQuery);
console.log($('#SelectedDiv').css("borderBottomLeftRadius"));
console.log($('#SelectedDiv').css("borderBottomRightRadius"));
console.log($('#SelectedDiv').css("borderTopLeftRadius"));
console.log($('#SelectedDiv').css("borderTopRightRadius"));