eewan wrote:
Hello,
I want to find full width of all elements in one div. Here is example
code:
<div id="scroller">
<p>text</p>
<p>text</p>
<p>text</p>
<p>text</p>
</div>


$("#scroller p").each(
function(i){
var elSize = $(this).width();});

I need total width of all <p> :-)

Thanks in advance


The following seems to work for me:

var elSize = 0;
$("#scroller p").each(
function(i){
elSize+=$(this).width();});
console.log(elSize);

Jonathan
--
Jonathan Vanherpe - Tallieu & Tallieu NV - jonat...@tnt.be

Reply via email to