0

I am removing the btn class after I hit it for the first time and adding new class to it. When I hit second time with btn1 class it's not adding any class.

<script type="text/javascript">
$('.btn').click(function(){
    $('.fC').addClass('fCr');
    $('.sC').addClass('sCr');
    $('.btn').addClass('btn1').removeClass('btn');
});
$('.btn1').click(function(){
    $('.tC').addClass('tCr');
    $('.sC').addClass('fCr');
});
</script>
das-g
  • 9,718
  • 4
  • 38
  • 80

0 Answers0