How do I select the next “n” elements starting from the current element in jQuery? May 7, 2023 by Tarik This should work: $(this).nextAll().slice(0,4).attr(…) Update: This will work, too: $(this).nextAll("*:lt(4)").attr(…)