<ul>
<li class="active">
<a></a>
<ul>
<li class="active">
...
</li>
</ul>
....
$('.parent-list li').click(function(){
$('.parent-list li').removeClass('active');
$(this).toggleClass('active');
});