The containment property limits the drag of the elements to the edges of the browser window. Which give me scroll bar lengthy with empty space.I have a list within a div drop_down_list
now for making sortable I wrote following code:
$('.drop_down_list').sortable({ // make drop down sortable.
axis: "y",
placeholder: ".drop_down_list_placeholder",
forcePlaceholderSize: true,
containment: ".drop_down_list",
scrollSpeed: 3000
});
but when I am dragging my li
element outside the div
than scroll bar is still increasing and I am getting white space in my div
, after dropping element everything is OK. I want to restrict my scroll bar length within my div
, how can I do that ?
jsfiddle link for the problem- http://jsfiddle.net/mqnrD/24/