I have developed my own custom jQuery plugin to tackle this issue
(function ($) {
$.fn.customcss= function(property) {
var selector = this.selector;
var cssProperty = property;
var cssValue;
$.each(document.styleSheets, function(sheetIndex, sheet) {
$.each(sheet.cssRules || sheet.rules, function(ruleIndex, rule) {
var selectors = rule.selectorText.toLowerCase().split(',');
$.each(selectors,function(index,value){
if(value.trim() == selector){
var cssResult = rule.style.getPropertyValue(cssProperty);
if(typeof(cssResult != 'undefined') && (cssResult != null)){
cssValue = cssResult;
}
}
})
});
});
var inlineStyles = $(selector).prop('style').cssText.split(';')
$.each(inlineStyles,function(index,value){
var style = value.split(':');
if(style[0].trim() == cssProperty){
cssValue = style[1].trim();
}
})
if(typeof(cssValue) == 'undefined'){
cssValue = $(selector).css(cssProperty);
}
return cssValue;
};
}(jQuery));
How to use:
$(document).ready(function(){
var cssValue = $('#somediv').customcss('width');
console.log(cssValue);
});