2

I'm using JQuery UI and Touch Punch to do some mobile work. I have a vertically scrolling list of items that I need to make draggable. Obviously this presents a problem. My idea was to limit dragging to a certain vector and everything else would scroll. I cannot make it work.

For starters, I'm simply using JQuery's draggable parameters to limit dragging strictly to the X axis.

$('.menu-item').draggable({
    revert: true,
    helper: 'clone',
    opacity: .75,
    appendTo: 'body',
    axis: 'x'
});

This completely disables scroll. Is there any way to have both functionalities?

  • Not sure I understand what you are looking for here. Can you provide an example and explain what you couldn't make there? – Dekel May 23 '17 at 22:24
  • I'll work on a demo, but it's only applicable to mobile. Basically, `.draggable` intercepts the mosuedown/ontouch event and I can no longer scroll the parent container with touch/drag. –  May 24 '17 at 15:43
  • Did you ever solve this? We're facing the same problem for our project currently. – Dysprosium Nov 14 '17 at 22:52
  • No, sorry, I had to find another solution. –  Nov 14 '17 at 22:53
  • What have you ended up doing? I have the same problem. – user3599803 Aug 09 '18 at 17:19

0 Answers0