JSFiddle - React, Tailwind, and code Playground

by Sergey Gornostaev

HTML

<a href="http://google.com" target="_blank">Click</a>
<div>Test</div>

CSS

div {
  border: 1px solid #000;
  width: 100px;
  height: 100px;
  margin: 5px;
}

JavaScript

$('a').click(function(e) {
  e.preventDefault();

  var href = $(this).attr('href');

  $('div').animate({height: '+=50'}, 2000, function() {
    var win = window.open(href, '_blank');
    if(win)
    	win.focus();
    else
    	document.location = href;
  });
});