Element:
var dv = "<div style='width:300px;height:100px'></div>";
How to I get 300px printed in the output?
alert($.parseHTML(dv).width()) //outputs undefined.
Fiddle: https://jsfiddle.net/3yq1bgvk/1/
Element:
var dv = "<div style='width:300px;height:100px'></div>";
How to I get 300px printed in the output?
alert($.parseHTML(dv).width()) //outputs undefined.
Fiddle: https://jsfiddle.net/3yq1bgvk/1/
$.parseHTML(dv)will returnarrayalert($.parseHTML(dv)[0].style.width);