Answer the question
In order to leave comments, you need to log in
How to make a dropdown menu like Yandex?
How to make the menu appear like Yandex?
Smooth appearance with slight fall out.
I tried it and here's what's left.
There is no smooth appearance, a delay and an immediate appearance.
$("#more").click(function(){
$('.more_menu').fadeIn(500).css('display', 'block');
});
Answer the question
In order to leave comments, you need to log in
$('.more').click(function(){
var menu = $('.menu');
if (menu.css('display') == 'none') {
menu.fadeIn(300);
}
else {
menu.fadeOut(100);
}
});
You can't animate from display: none to display: block . Try it with opacity and element position .
It's easy enough to write:
$("#more").click(function(){
$('.more_menu').fadeIn('fast');
});
$("#more").click(function(){
$('.more_menu').fadeIn(500).css('display', 'block');
});
$("#more").click(function(){
$('.more_menu').fadeIn(500, function(){
$(this).css('display', 'block');
});
});
var moremenu = $('.more_menu');
moremenu.hide();
$("#more").click(function(){
$('.more_menu').fadeIn(500);
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question