JSFiddle - React, Tailwind, and code Playground
HTML
<style>#scrollarea div {height: 100px;width: 640px;}</style>
<div id="scrollarea">
<div>
<img src="http://192.168.0.65/public/user/9f/39/3966_c0bf.jpg" />
</div>
</div>
CSS
#scrollarea {
cursor: move;
height: 288px;
width: 775px;
border: 1px solid #6B7B95;
overflow: hidden;
}
JavaScript
window.addEvent('domready', function(){
var drag = new Drag('scrollarea', {
style: false,
invert: true,
modifiers: {x: false && 'scrollLeft', y: true && 'scrollTop'},
onStart: function(){
},
onComplete: function(el){
alert(el.getStyle('left'));
}
});
});