I want to have a bunch of spans with classes of different "depths", i.e one may be depth 1, another depth 2, another depth 3.
<span class="depth1"></span>
<span class="depth2"></span>
<span class="depth3"></span>
Then, if I want to hide anything that's below depth 3, I don't know how else to do it besides a for loop
for (i = 1; i <= 2; i++)
$(".depth" + i).hide();
Is there any better way to do this? maybe class ="3" instead of "depth3"? And any way to allow floating points, so that 2.5 and 1.5 will both be hidden too?