i made this code using jquary to make multi-menu , so when i click first time on sub-menu it opens, when i click on the second string it opens another one, but when i click back nothing happens. help please enter image description here

my css
li>ul{
display: none;
}
li>ul.--active {
display: block;
}
$(function() {
$('.--clickable>a').click(function(event) {
event.preventDefault();
$(this).next('ul').toggleClass('--active' );
});
});