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 :

  1. in iframe used custom tag : <item></item>
  2. 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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -