jquery draggable / sortable with disabled items -


using include , exclude example, trying make if 2 items excluded , item can't dropped between them.

review url; http://jqueryui.com/sortable/#items

the top example perfect except item's can't dropped before or after lists (move item 4 top, try , put item 4 back, wont let you).

in second example items can put before/after , between disabled items, again half way want.

is there way make disabled items can't inserted between?

the following fiddle has working example if know disabled options going next each other. adds dropable spot after last disabled spot.

fiddle

 $(function () {      $("#sortable1").sortable({          items: "li:not(.ui-state-disabled),li.ui-state-disabled:last-child"      });      $("#sortable2").sortable({          cancel: ".ui-state-disabled"      });      $("#sortable1 li, #sortable2 li").disableselection();  }); 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -