Answer the question
In order to leave comments, you need to log in
How to make animation when text is hidden on button click?
In general, the essence is this ... there is a menu, but I would like it to appear when you click on the button and also disappear when you click it. how to do it.
The idea is that the text would fly under the logo and also appear from under it, i.e. the lines of the horizontal menu flew to the right (the menu appears), fly away to the left (the menu is hidden).
Answer the question
In order to leave comments, you need to log in
$(".класс кнопки").click(function(){
$(".класс меню").toggleClass("visible");
})
.класс меню{
overflow:hidden;
width:0;
transition:all 0.2s ease;
}
.класс меню.visible{
width:700px; //например
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question