I have
<style> .container { position:relative; width:600px; height:400px; overflow:hidden; } .div-inner { position:absolute; top:0px; left:0px; width:7200px; cursor:e-resize; } </style>
$ (". div-inner"). draggable ({axis: "x"});
<div class="container"> <div class="div-inner">Drag me!</div> </div>
I want to hold back the movement to the left and right of the width of the div at 7200 pixels.
if it were a scrollable element, I would skip it on the left: 0px; left: (7200-600) px;
How can I do this with draggable?
Thank you very much!
source share