javascript - Getting widths of dynamic float divs -


i building dynamic dropdown navigation.

in dropdown there multiple floating divs, between each 'row of items' have add horizontal divider. can't set static width because text-length of items dynamic , may not wrap.

so reading each container, reading div items, want read width of items add divider can't manage it.

$('.mutopnavdropdown').each(function(i, e) {         var iwidth = 0;         $(this).find('.mainsubnavrowitem').each(function(ii, ee) {         if (iwidth > maxwidth)         alert('divide!');              alert($(ee).width() +'-'+ $(ee).offsetwidth +'-'+ $(ee).clientwidth);              iwidth += $(ee).width();         });      }); 

how read floating div no width value , dynamic content inside width?

your code works me. divs visible? if divs set display none jquery not able return width.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -