JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<button type='button' id='button1'>button 1</button>
<button type='button' id='button2'>button 2</button>

CSS

.pushed {
  background-color: salmon;
}

JavaScript

$('#button1').click(function () {
  $('#button2').toggleClass('pushed');
});

$('.pushed').click(function () {
  alert('pushed!')
});