Comments (6)
- 是否能正常跑起来
- 具体代码是否可以放出来我看看?
- 我 demo 的页面测试 moveTo 跳转正常哦
from pageslider.
能正常跑起来,就是跳不了指定的页面,
var page = new PageSlider({
pages: $('.page-wrap .page'),
onSwipeUp: function () {
if(this.index == 1){
this.moveTo(3);
},
});
from pageslider.
其实我想要的效果是,如果中间有几张页面是display:none 的,想直接跳过去,有什么好的建议吗?
from pageslider.
var page = new PageSlider({
pages: $('.page-wrap .page'),
});
如上代码,pageSlider 的调用方式是自己控制的,如果你中间有是隐藏的,你可以通过改变他的 class,如 page 改成 hide,通过 class 控制其隐藏,那么,就不会被获取了;如果你一定要用 style="display:none" 的方式,你也可以自己写代码过滤掉隐藏的元素,只要你传过来的 pages 参数是显示的即可。
from pageslider.
意思是如果class上没有page这个类,并且隐藏这个div 就不会被获取了是吗?
from pageslider.
是啊,这些都是很自由控制的,你 class="page" 的去掉,就不会被获取了,改成其他,如 class="hide", 然后通过
.hide{
display: none;
}
来实现隐藏,就 OK 了。
from pageslider.
Related Issues (17)
- 太赞了,加油! HOT 3
- 如果页面内要放刮刮卡,有什么办法阻止页面滑动吗 HOT 2
- 调用moveto(n)之后向下滑动失效 HOT 2
- 在ios手机上加某些动画,背景图片会闪烁一下 HOT 2
- 华为手机虚拟键盘会引发滑页BUG HOT 3
- 关于预加载的问题 HOT 1
- 嵌入到 iframe后,longpage不能滚动
- translate导致fixed失效,有解决办法吗?
- 请问能够禁止上下滚动吗 HOT 1
- 为何“-webkit-overflow-scrolling: touch;”有时不起作用 HOT 1
- 有没有办法知道即将滑动到下一页的index? HOT 9
- 关于长页面的高度问题 HOT 3
- 从Android app里面内嵌的浏览器打开为何滚动不了而且翻不了页,是兼容问题吗?ios可以的 HOT 6
- 你好,感谢你开发此插件,example二维码不能用了 HOT 3
- 我加入了以下CSS后就不能正常使用了,我想让.mevos-con下面的图片宽、高都为100%铺满。 HOT 2
- page子元素的尺寸问题 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pageslider.