6

I have a inline thumbnail gallery view which is sortable using jQueryUI and the touch punch plugin for mobile devices.

Everything is working fine apart from the fact that when on mobile devices and there are lots of images, I cannot scroll down the screen to view more images because it sortable kicks into action.

So i can only move and sort the items on view on the screen.

I was therefore wondering if its possible to put a delay on the sortable items of say 2 seconds. So you have to touch and hold for the li items to become active to move. Then i was wondering if its possible to then allow scrolling over the thumbnail gallery which will allow me to move down the list.

My code:

      $(function() {
        $( "#sortable" ).sortable({
          delay: 900,
          scroll: true,
          placeholder: "ui-state-highlight"
        });
        $( "#sortable" ).disableSelection();
      });

The delay works, but still cant scroll down the list of images without them changing order

Hope someone can help.

Thanks

John
  • 1,777
  • 9
  • 42
  • 66

2 Answers2

0

Use "Bind" to make this jquery carousel works, try this code as follows ;

$("#sortable").bind('swipeleft',function(event, ui){

    });

More information http://learn.jquery.com/jquery-mobile/getting-started/

0

delay: millisecond

change millisecond to the desired timelength before dragging starts

add this to the setting of your sortable

Jc Tan
  • 1