JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<div id="SortParent">
<div class="sort-child">
<span class="handle">GRAB ME</span>
<input type="text" size="10" placeholder="Category" value="0" />
<input type="text" size="20" placeholder="Title" />
<select><option>Opt 1</option><option>Opt 2</option></select><br />
<div class="stuff-to-hide">
<textarea placeholder="Description"></textarea><br />
<span>Some other thing I want hidden</span>
</div>
</div>
<div class="sort-child">
<span class="handle">GRAB ME</span>
<input type="text" size="10" placeholder="Category" value="1" />
<input type="text" size="20" placeholder="Title" />
<select><option>Opt 1</option><option>Opt 2</option></select><br />
<div class="stuff-to-hide">
<textarea placeholder="Description"></textarea><br />
<span>Some other thing I want hidden</span>
</div>
</div>
<div class="sort-child">
<span class="handle">GRAB ME</span>
<input type="text" size="10" placeholder="Category" value="2" />
<input type="text" size="20" placeholder="Title" />
<select><option>Opt 1</option><option>Opt 2</option></select><br />
<div class="stuff-to-hide">
<textarea placeholder="Description"></textarea><br />
<span>Some other thing I want hidden</span>
</div>
</div>
<div class="sort-child">
<span class="handle">GRAB ME</span>
<input type="text" size="10" placeholder="Category" value="3" />
<input type="text" size="20" placeholder="Title" />
<select><option>Opt 1</option><option>Opt 2</option></select><br />
<div class="stuff-to-hide">
<textarea placeholder="Description"></textarea><br />
<span>Some other thing I want hidden</span>
</div>
</div>
<div class="sort-child">
...
CSS
textarea { min-height: 150px; width: 90%; margin: auto;}
.handle { cursor: move; }
.diff-height { height: 2em; border: 1px solid red;}
p { height: 1.5em; border: 1px solid blue; }
div{ border: 1px solid green; }
div.sort-child {border-color: orange;}
JavaScript
$(document).ready(function () {
$('.handle').mousedown(function() { $('.stuff-to-hide').hide(); });
$("#SortParent").sortable({
handle: '.handle',
items: '.sort-child',
start: function(event, ui) {
$('.stuff-to-hide').hide();
$('.sort-child').addClass('diff-height');
},
helper: function() { return '<p>MY DRAGGING BAR</p>'; },
forceHelperHeight: true,
stop: function() {
$('.stuff-to-hide').show();
$('.sort-child').removeClass('diff-height');
}
});
});