[jQuery] Re: finction width(divs) is not defined

2009-06-05 Thread waseem sabjee
you can try this var divsize = $("div").width(); however if one div size differs you won't get an accurate reading so try this var divsize; $("div").each(function(i) { divsize += $("div").eq(i).width() + ', '; }); this will return the widths of each div seperated by a comma in your variable

[jQuery] Re: finction width(divs) is not defined

2009-06-05 Thread Ricardo
There is no global 'width' function in jQuery. It's a method of jquery objects, try it this way: $(function(){ console.log( $('div').width() ); }); On Jun 5, 8:35 am, runrunforest wrote: > Hi, > >