views:

328

answers:

1
$(this).parent().next().css('display','none');

The above only hides the sibling right next to the current one.

If there are multiple ones,will fail.

+2  A: 

You need to use nextAll()

$(this).parent().nextAll().css('display','none');

or even better:

$(this).parent().nextAll().hide()
nickf