Try this code :
<div class="draggable_container">
<div id="draggable_1" class="draggable">
<div class="exp"><!-- --></div>
</div>
</div>
html
{
height:3000px;
}
.draggable_container
{
height:300px;
background-color:red;
width:140px;
}
.draggable
{
height:60px;
width:130px;
cursor:pointer;
border:5px solid #000000;
background-color:#ffffff;
}
$(".draggable").draggable({
axis: "y",
containment: 'parent'
});
Now, if you click on the box "draggable" and you move the mouse up and down, it will move till the container height.
But, if you click with the mouse to this box, and you scroll the page (with the mouse wheel...or moving the cursor to the bottom, without release the mouse) the box go over the container. And this sucks.
Is it a common bug? How can I fix this trouble?
I don't know if this is a bug, but I solve it by adding overflow:auto
to the .draggable_container
css class. See it here: http://jsfiddle.net/QhVNr/2/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With