Answer the question
In order to leave comments, you need to log in
How to make a slide out panel without jQuery?
I need the block (actually three, but it doesn’t matter now) to move to the right when the button is pressed, and when pressed again, to drive back to the left. jQuery is not possible - I'm trying to deal with animation in JS, and somehow it doesn't work.
Here is the code so far: plnkr.co/edit/hLNRYMi3kuRkPyPLEXBF?p=preview
Answer the question
In order to leave comments, you need to log in
I would simplify life and do it in CSS. Use properties transform: translateX(значение_на_которое_поедем)
to move and
transition: [что] [за_какое_время] [функция_движения] [задержка]
for smooth movement.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question