Use .siblings()
(function($){ // REMAP "$" to jQuery
$(function(){ // DOM READY shorthand
$("li").click(function(){
$(this).slideDown(800).siblings().slideUp(800);
});
});
})(jQuery);
or in your case might be this (I don’t know as it’s a bit unclear)
$("li").click(function(){
$(this).find('.step').slideToggle(800);
$(this).siblings().find('.step').slideUp(800);
});
2
solved target children elements but not the ones of the clicked one [closed]