jquery - Get height & width of custom HTML tag in Chrome -
i have created custom html tag in iframe. parent try element height , width when pointer hovers on element. have idea how height , width element? works in firefox in chrome returns 0.
example :
- in iframe used custom tag :
<item></item>
- i access element parent :
$('#iframe').load(function(){ $('#iframe').contents().find("item").hover( function(){ var height = $(this).height(); var width = $(this).width(); console.log("height : "+height+" | width : "+width); // it's return 0 in chrome }, function(){ }, ); });
i think problem because chrome doesn't recognize custom html tag. i'm not sure that. help.
the doctype must valid <!doctype html >
, put display block on 'item' element
Comments
Post a Comment