Hi all!
I have this plugin which has a simple each loop
var width = 0;
$(this).children().each(function()
{
width + $(this).width();
});
If i run this on a single element with for example an id selector things
work fine. But if I run it on multiple elements with a class selector the
variable width will be the width of all elements with that certain class. I
want it to somehow reset to 0 for each element selected. Can this be done
somehow? In other words I need to now when the each iterator starts
iterating over a new elements children.
Thanks!
--
View this message in context:
http://www.nabble.com/Incrementing-values-in-a-each-loop-for-multiple-elements-tp16006330s27240p16006330.htmlSent from the jQuery General Discussion mailing list archive at Nabble.com.