1

I'm using jquery ui with touch punch to get a selectable set of images to be touch enabled for mobile. I've got it working great except for one caveat is that when trying to scroll and you touch one of the images, it tries to select multiple items as per jquery ui's way of doing things. But I'm using a mouse down bind as per the example below

$(".YOUR_SELECTOR_HERE").bind("mousedown", function(e) {
  e.metaKey = true;
}).selectable();

What I need to be able to do is disable jquery's multiple select when dragging and only have tap to select enabled for multiple items.

Is this possible?

Mohamed-Yousef
  • 23,946
  • 3
  • 19
  • 28
  • you can take a look at http://stackoverflow.com/questions/861668/how-to-prevent-multiple-selection-in-jquery-ui-selectable-plugin and http://jsfiddle.net/mohamedyousef1980/j3kqLhga/ – Mohamed-Yousef Dec 06 '15 at 17:13
  • Hi Mohamed, i tried some of the solutions here but they dont allow me to make multiple selections but still disable lasso selection. you can check out what i'm talking about in mobile here http://demo.thirdwunder.com/go/soul-cities-win-custom-guitar-trip-two/ – Mohamed Hamad Dec 06 '15 at 18:39
  • to be honest I'm not expert in jquery-ui .. I just decided to help you by made some search .. and I returned with the links above .. Sorry about that .. so what I can do now is to +1 your question may someone else can help .. but you should know that you have a good looking website..keep going .. Good Luck :) – Mohamed-Yousef Dec 06 '15 at 22:46
  • thanks Mohamed. If figured it out. It has to do with the different states of a selectable. We have **selecting **, **selected**, **unselecting** and **unselected**, where each has a specific operation> The tricky bit was finding out that when an unselected item is clicked and dragged, it fires the unselecting and unselected, which then causes a lot of confusion. But thanks for your support, and glad you like the site. – Mohamed Hamad Dec 07 '15 at 15:28

0 Answers0