Below is my HTML code, I want to remove active
class from 1st li
and add it to 2nd li
and viceversa automatic every 2 second using jQuery.
<li class="">
<a href="#">
<img src="client_logo01.png">
</a>
</li>
<li class="active">
<a href="#">
<img src="client_logo02.png">
</a>
</li>
I'm trying to do in this way.
$('ul li a').click(function() {
$('ul li.current').removeClass('active');
$(this).closest('li').addClass('active');
});
But it is only working on click event.