JSFiddle - React, Tailwind, and code Playground
by jashwant
HTML
<div class="picturecontainer" style="overflow: hidden; position: relative; width: 650px; height: 150px; border: 1px solid #888;">
<img class="headerimage" src="http://www.animize.de/modules/users/profile/images/profileheader/header_3722386791348526090.jpg" />
<div style='height:200px'>The div with height</div>
</div>
JavaScript
$(function() {
var img = $(".headerimage");
img.css('cursor', 's-resize');
var x1 = img.parent().width() - img.width();
var y1 = img.parent().height() - img.height();
$(".headerimage").draggable({
containment: [x1,y1,0,0],
scroll: false,
axis: "y",
stop: function(event, ui) {
}
});
});