I need your help. I want to create a little menu with effects slideUp and slideDown.
I’ve found a solution, but i want to ask you if there is a “cleaner” and better solution.
Here’s my Code:
var menu_id = "";
$('.menu li a').click(function(){
var currentId = $(this).attr('id');
if(menu_id != ""){
$('#frame-' + menu_id).slideUp();
}
if(currentId != menu_id){
$('#frame-' + currentId).slideDown();
menu_id = currentId;
}
else{
menu_id = "blank"
}
});
Regards
Dario
Based on the post by sp00m try this