P
P
Platon Platonovich2016-04-07 11:30:02
JavaScript
Platon Platonovich, 2016-04-07 11:30:02

Hide object when activating another?

codepen.io/iiil/pen/KGerA
It is necessary that the activated elements are replaced with each other, and not overlapped.
What to add to JS? Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Kovalsky, 2016-04-07
@dmitryKovalskiy

Add in the first step
$('div').removeClass('active')

D
Denis Smirnov, 2016-04-07
@Groov3

Add a check for display:block or for the presence of the active class, can you handle it yourself?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question