L
L
learn_to_alive2015-10-22 15:16:31
JavaScript
learn_to_alive, 2015-10-22 15:16:31

How to do it in jQuery?

Trying to make tabs: https://jsfiddle.net/ .
Question: how can I make it so that when I select the next tab, the class that makes it active is removed from the previous one?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikolai Shabalin, 2015-10-22
@learn_to_alive

codepen.io/aurfon/pen/YyeWyN

D
Dmitry Kovalsky, 2015-10-22
@dmitryKovalskiy

$(".tabs").removeClass('active')
$("#newClickedTab").addClass('active')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question