There are two lists. When you click on one of the items in one list, it is assigned a class, while others are deleted.
How to make that in the next list, at the corresponding element this class too was attached and deleted. That is, if in the first list the (third for example) element has the class .active , then it appeared in the other at the same element. It is desirable that the test goes in both directions.
Below I wrote an example of a small code, but I have not yet understood how to connect ...
$(".sliderone li").click(function() { $(".sliderone li").removeClass("active"); $(this).addClass("active"); if($(".sliderone li:eq("+el+")").hasClass('active')){ $(".muther .child:eq("+el+")").addClass('active') } }) li.active, .child.active { background: #95FFCC; padding: 5px; border: 2px solid #2C9A00; } <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> <ul class="sliderone"> <li>1</li> <li class="active">2</li> <li>3</li> </ul> <div class="nextclock"> <div class="muther"> <div class="child">11</div> <div class="child">22</div> <div class="child">33</div> </div> </div> Please note that one of the elements already has this class, that is, checking for the presence of a class should work not by clicking, but immediately, regardless of whether they clicked or not. Do not scold for errors, just try not know yet how.