miRrage,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
$(function() {
$('.catList').on('click', function(){
var level = $(this).data('level'), stop = true;
$(this).nextUntil().filter(function() {
if($(this).data('level') <= level) stop = false;
return stop && $(this).data('level') > level
}).slideToggle();
})
});
</script>
</head>
<body>
<div class="row">
<div class="col-md-3">
<ul id="sortable">
<li class="catList defaultLi" data-level="1" data-row-id="1"> one</li>
<li class="catList defaultLi" data-level="2" data-row-id="2"> two</li>
<li class="catList defaultLi" data-level="2" data-row-id="3"> three</li>
<li class="catList defaultLi" data-level="3" data-row-id="4"> four</li>
<li class="catList defaultLi" data-level="3" data-row-id="5"> five</li>
<li class="catList defaultLi" data-level="1" data-row-id="6"> six</li>
<li class="catList defaultLi" data-level="2" data-row-id="7"> seven</li>
<li class="catList defaultLi" data-level="1" data-row-id="8"> eight</li>
</ul>
</div>
</div>
</body>
</html>