adgsm / multi-level-push-menu

MultiLevelPushMenu jQuery Plugin implementation
http://multi-level-push-menu.dzunic.net
804 stars 213 forks source link

scroll menu on mobile devices with touch gesture (swipe) #75

Open ramiz4 opened 10 years ago

ramiz4 commented 10 years ago

hey, is it possible to scroll the menu (vertical) on mobile devices with touch gesture???

adgsm commented 10 years ago

not yet

pixelchild commented 10 years ago

This burned me too.. Spent the day adding it to a eCommerce site that has lots of navigation items. Finally finished and then bring out the phone.. "Oh crap! it dosnt scroll!" Day wasted.

Okay, for any one else that encounters this. To disable the touch events which is whats stopping the scroll events from propagating.

Replace

if( mobileCheck() ) {
     clickEventType = 'touchend';
     dragEventType = 'touchmove';
}
else {
        clickEventType = 'click';
    dragEventType = 'mousedown';
}

For

clickEventType = 'click';
dragEventType = 'mousedown';

You wont get your fancy stuff but at least your users can scroll.

lukadelux commented 10 years ago

@pixelchild you are a life saver sir :)

ramiz4 commented 10 years ago

@pixelchild thank you it works :) yes the fancy stuff like collapse menu with touch gesture dont works any more...

Sue-k commented 8 years ago

I really would like to apply above (clickEventType & dragEventType) fix for 'Vertical scroll' issue. Can you explain where above code need to go?

adoerler commented 8 years ago

@pixelchild: Thank you so much for your suggestion, this fixed our problem too.

As neither the eventType variables nor the function mobileCheck are public accessible one has to patch the plugin itself, which is not good practice in my opinion.

Kind regards Andreas

cpase commented 6 years ago

@pixelchild I know this is an old post...not sure if you're still around. But I replaced what you had mentioned, but it still won't scroll on mobile...I may not be doing something correct?

cpase commented 6 years ago

@adoerler Would you mind sharing what you did to get the mobile vertical scroll to work?