本文介绍了JQtouch滑动事件/轮播的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

好,所以我要的不是幻灯片.我的具体目标是拥有一个可以容纳一定数量的div的容器,并且用户可以在上述div中滑动.如果有人熟悉Sencha touch,我正在寻找诸如轮播面板之类的东西.具体来说,这将是一个人物页面,其中将包含人物照片和说明.因此,在进行了这项研究之后,我遇到了几种选择,其中一种是...

Ok so what I want isn't quite a slide show. My specific goal would be to have a container that houses a set number of divs and the user can swipe through said divs.If anyone is familiar with Sencha touch, I'm looking for something like the carousel panel. specifically it's going to be a people page that will house a photo of a person and a description. So after doing so research I came across a few options, one being...

 $(function(){
                 // This prevents scrolling
                $('#jqt').bind('touchmove',function(){
                    event.preventDefault();
                });
                $('#p1').bind("swipe",function(event, info){
                    if (info.direction === 'left') {
                        jQT.goTo($('#p2'), 'slideleft');
                                        }
                });
            });

此选项的问题是,它会将整个页面(甚至是工具栏)都滑动了一下.我在样式方面也做得不好.是否有任何扩展允许这种类型的操作?甚至是一种编码方式?

My issue with this option is that it swipes the whole page, even the toolbar away. I'm also not doing something right with the styling. is there any extensions that allow for this type of action? Or even a way to code this?

推荐答案

jq.mobi有一些用于轮播的插件: https://github.com/appMobi/jQ.Mobi/tree/master/plugins

jq.mobi has some plugins for things like carousels:https://github.com/appMobi/jQ.Mobi/tree/master/plugins

您可以使用该代码作为起点. jq.mobi本身还很年轻,但是您可以使用该代码作为zepto插件的起点.

you could use that code as a starting point. jq.mobi itself is a bit young, but you could use that code as a starting point for a zepto plugin.

这篇关于JQtouch滑动事件/轮播的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 18:21