I use the below code to arrange my divs :
$( ".myDivs" ).sortable({
connectWith: [".myDivs"]
});
Is it possible to amend this code so as to exclude divs that can be sorted(moved) which contain a particualar css value :
<div class="myDivs excludeThisCss"><Excluded From Move></div>
You can use :not() to target the
myDivsclass that don’t have theexcludeThisCssclass:See this working Fiddle Example!
HTML FOR THE EXAMPLE
JQUERY
On the Fiddle example, you will be able to drag all
.myDivsitems, but the ones with.excludeMeclass will not move!