$(this).parent().next().css('display','none');
The above only hides the sibling right next to the current one.
If there are several, it will fail.
You need to use nextAll()
nextAll()
$(this).parent().nextAll().css('display','none');
or even better:
$(this).parent().nextAll().hide()
Source: https://habr.com/ru/post/1715501/More articles:Cross-platform CSS - cssCheck if saved proc process is working? - sql-serverJAVA support for Semantic Web - javaA simple MySQL query takes 2 to 3 seconds? - performanceHow to implement jQuery to get elements by class name? - jqueryBest Domain Host for App Engine? - google-app-engineMutliplatform application: (Automated) Testing for Mac OSX howto? - cloudBluetooth UUID Detection - uuidError using MSBuild tokens in PropertyGroup - msbuildIs there any reason NOT to use git -masquerading-as-cvs as an upgrade to cvs? - javaAll Articles