jakiestfu / Snap.js

A Library for creating beautiful mobile shelfs in Javascript (Facebook and Path style side menus)

Home Page:http://jakiestfu.github.io/Snap.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Disable dragging effect on desktop

elharony opened this issue · comments

The reason for me to use "snap.js" was to benefit from it as a menu for small devices ( below 768px ) but SADLY it's dragging everywhere!

How to make it only dragging below 768px and disable it for high width devices?

Thanks in advance!

I solved it by checking on it, then initializing it in my desired width only, check that snippet:

if ($(window).width() < 768) {
   // Initialize snap.js here and write all your settings...
}

That's a very simple solution, I think it should be another way directly from the option, but anyway I solved it, hope you find it useful!