0

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_listnow 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/

4

1 回答 1

1

In the jsfiddle, adding "scroll: false" to the sortable callback should fix this.

于 2013-03-14T11:51:02.123 回答