R
R
robben12342015-09-21 22:17:02
JavaScript
robben1234, 2015-09-21 22:17:02

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

2 answer(s)
M
Maxim, 2015-09-21
@m_pchelnikov

I would simplify life and do it in CSS. Use properties transform: translateX(значение_на_которое_поедем)to move and

transition: [что] [за_какое_время] [функция_движения] [задержка]
for smooth movement.

V
Vitaly Inchin ☢, 2015-09-22
@In4in

For example, like this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question