javascript - How to make jquery sortable items sort only the sortable items and not the non sortable -


i have sortable items:

<div class="sortitems"> <div class="sortphotos nonsortable">item 1</div> <div class="sortphotos nonsortable">item 2</div> <div class="sortphotos nonsortable">item 3</div> <div class="sortphotos ">item 4</div> <div class="sortphotos ">item 5</div> </div>  $(".sortitems").sortable({  items : ' > .sortphotos',  items : ':not(.nonsortable)' 

});

my problem this, want sort item 4 , item 5 , don't want them cross on ".nonsortable" divs. meaning, don't want item 4 or item 5 in front or in middle of of the ".nonsortable" divs.

update:

i don't want happen:

<div class="sortitems"> <div class="sortphotos ">item 4</div> <div class="sortphotos nonsortable">item 1</div> <div class="sortphotos nonsortable">item 2</div> <div class="sortphotos ">item 5</div> <div class="sortphotos nonsortable">item 3</div> </div> 

i want sortable divs items sortable. can this:

<div class="sortitems"> <div class="sortphotos nonsortable">item 1</div> <div class="sortphotos nonsortable">item 2</div> <div class="sortphotos nonsortable">item 3</div> <div class="sortphotos ">item 5</div> <div class="sortphotos ">item 4</div> </div> 

any appreciated.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -