When the button is pressed to activate another (carousel)?

The question arose in the implementation of this idea in jquery. There are 2 buttons one of them should ByType default blocked ie when clicking on 1st button the 2nd rasplachivaetsya and after clicking on the 2nd button, it locks again (and again will have to repeat with the first button). Thanks for the help.

The first button
<button type="button" class="btn btn-warning pull-right" id="countingDate"> <span class="glyphicon glyphicon-remove"></span> Counting days</button>

The second button
<button type="submit" id="createDateBtn" name="button" class="btn btn-primary pull-right"> <span class="glyphicon glyphicon-plus"></span> Create</button>
June 5th 19 at 21:16
1 answer
June 5th 19 at 21:18
let $btn2 = $('#btn2');
$('#btn1').on('click', function(){
 // your code

$btn2.on('click', function(){
 $btn2.attr('disabled', 'disabled');
 // your code

Find more questions by tags jQuery