JSFiddle - React, Tailwind, and code Playground
by calder12
HTML
<div id="div1"> links<br />links links<br />links<br /><a href="#" class="hideme">Click me</a></div>
<div id="div2">Stuff to keep where it is</div>
JavaScript
$('.hideme').click(function() {
var height=$('#div1').height();
$('#div1').fadeOut('slow', function() {
$('#div2').css('margin-top', height);
});});