JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
<div class="help-block"></div>
<button class="control" data="help-block">shake that cube</button>

CSS

.help-block {
  width:200px;
  height:200px;
  margin:0 auto;
  background:red;
}

JavaScript

function shakeAnimation(e) {
    $('.help-block').addClass('shake animated').delay(1200).queue(function(clear) {
      $(this).removeClass('shake animated');
      clear();
  });
}
$('.control').on('click', function() {
	shakeAnimation($('.'+$(this).attr('data')));
});