如何在发生滑动转换时停止 jQTouch 中的滑动事件?
我几乎完成了一个混合网站,但有一个问题我无法解决(许多问题是由于现在的 Sencha 库故意缺乏文档所致)。
我在向左和向右滑动时有一个绑定事件,正确的动画,就在我快速滑动或滑动时 - 页面开始转换(滑动) - 在转换时我再次滑动。我抛出 jQtouch 并导致黑页。
$('div.touch').swipe(function(event, info){
switch(info.direction){
case 'left':
jQT.goTo('#test', 'slide');
break;
我想“pageAnimationEnd”可能是我需要使用并以某种方式结合的事件。但对于菜鸟来说,指针会很好。 :)
I've almost finished a hybrid site and theres one issue I cant resolve (many due to the deliberate lack of documention on the now Sencha library).
I have a binded event on the swipe, left and right, proper animations, its just when I swipe quickly, or I swipe - the page starts to transition (slide) - whilest transisitoning I swipe again. I throws jQtouch and results in a black page.
$('div.touch').swipe(function(event, info){
switch(info.direction){
case 'left':
jQT.goTo('#test', 'slide');
break;
I'm thinking 'pageAnimationEnd' will probably be the event I need to use and tie in somehow. But pointers would be good, for a noob. :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我解决了这个问题。如果人们有更好的解决方案,请告诉我。
我创建了一个名为“延迟”的单例
“我知道它是全局的”,你可以按照你想要的方式实现它。这是快速修复。只需将其放入名为delay.js 的脚本中并将其附加到文档的开头即可。
现在,当您调用“Swipe”时,
请执行以下操作
这只会在两次滑动之间添加 1 秒的延迟。
I fixed the problem. If people have a better solution , let me know.
I created a singleton called "delay"
"I know its a global" , You can implement this anyway you want. Its the quick fix. Just put it in a script called delay.js and attach it to the beginning of ur document.
Now when you call "Swipe"
Do the following
This just puts a 1 second delay between swiping.