JSFiddle - React, Tailwind, and code Playground
HTML
<div style="width:50%">hello</div>
JavaScript
$.fn.pixels = function(property) {
return parseInt(this.css(property).slice(0,-2));
};
alert($('div').pixels('width'));
<div style="width:50%">hello</div>
$.fn.pixels = function(property) {
return parseInt(this.css(property).slice(0,-2));
};
alert($('div').pixels('width'));