How do I select the next \"n\" elements starting from the current element? What I mean is...
$(this).attr(...);
I want to do this \"n\" times
This should work:
$(this).nextAll().slice(0,4).attr(…)
Update:
This will work, too:
$(this).nextAll("*:lt(4)").attr(…)