Stereobit / dragend

dragend JS – a touch ready, full responsive, content swipe script
http://stereobit.github.com/dragend/
MIT License
485 stars 114 forks source link

Can we disable Dragend? #38

Open ianthedev opened 9 years ago

ianthedev commented 9 years ago

Instead of destroying it, can we just disable it and resume it later?

Stereobit commented 9 years ago

Hey, currently there is no disable option. I might add this in the future.

mikehuebner commented 9 years ago

Bumping this, this functionality would be amazing to have.

PowrSlave commented 9 years ago

I agree. Destroy is far too committing for situations where one needs to instantiate and destroy in a cyclical way.

Webdoors commented 8 years ago

Well I have the same issue, please make multiple intiation possible, or tell us what to do?

badoubadou commented 8 years ago

You can try this : disable: function() { var a = this.container; n(a, q, this._onStart); },

By the way @Stereobit your non minified file (dragend.js) doesn't match your minified file (dragend.min.js), but it's a great and very useful piece of code :)

ianthedev commented 8 years ago

Thanks @badoubadou. I will try it if I need it in the future.

joshuaiz commented 6 years ago

Bumping this. I'm using a toggle for scroll or swipe action (both web and mobile). It works once if you toggle from scroll to swipe which initiates dragend and then back to scroll if you destroy dragend which is needed as the swipe and scroll work on the same elements.

But then if you toggle back to swipe dragend no longer works so disable would be a great option in this case.

Also, as an aside, the destroy method in the docs did not work for me, I used destroy: true as an option and that works.