Please refer to this fiddle first:
http://jsfiddle.net/QhVNr/121/
I am writing a coding which enable user to drag the middle div[white color as in the fiddle.] What i want originally is when dragging the white portion upward will make the height of green color div decreased while the blue color div's height will increase.
But it ends up like in the example, the draggable white div like lost control and just go upward/downward lightning fast and over the parent wrapper. You may try to edit the code by comment out this 2 lines in javascript
$('#draggable_0').height(div1H);
$('#draggable_2').height(div3H);
Then the dragging function is acting like normal and will be contained within its parent.
How to solve this please anyone? To make the dragging and also the the green and blue div acting normal.
Thank you.