This is so simple problem but i don't understand problem. I was click div change class but it does not work when I click on the changing div
$(".one").click(function() {
$(this).attr('class', 'two');
});
$(".two").click(function() {
$(this).attr('class', 'one');
});
.one {width: 50px; height: 50px; background-color:red;}
.two {width: 50px; height: 50px; background-color:blue;}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="one"></div>