Comments (13)
另外,还遇到一个问题,就是我在页面内加上了连接,连接到http://www.baidu.com,再返回的时候,有链接的页面的右侧页面为空,是没有办法往左滑动的,当向右滑动再返回有链接页面的时候,其右侧页面又出现了,不清楚是什么问题导致的,
from islider.
你好, 使用islider.slideIndex
就可以得到索引值
from islider.
你好,非常感谢,这个我用了一下,没有问题了。但还有另一种情况,就是页面跳转再返回后,使用islider.slideTo(i);跳转到有链接的那张图片后,会出现右侧没有图片的情况。具体情况是
onslidechange:function(){
history.pushState(null,'New Page', '#index='+islider.sliderIndex);
}给每个页面添加唯一的url,在当前页面添加链接,比如连接到http://www.baidu.com,再回退,使用islider.slideTo(i);跳转到链接页,会出现右侧没有图片,左侧有,滑动到左侧页面,再返回,就可以看到链接页右侧的页面了,希望您能帮我看一下是什么原因导致的,谢谢!
from islider.
islider会生成3个<li>
容器,你检查一下右侧对应的li内是否有内容,如果有,检查一下是否被置为了visibility:hidden。
from islider.
嗯,我看一下,右侧对应的li中visibility:visible的,但是是一个空的li,但是右侧的li中应该是有数据的,
from islider.
那你需要打断点看一下下面这段代码,看看是否正确执行
if ( Math.abs(n) > 1) {
this._renderItem(els[0], idx - 1);
this._renderItem(els[2], idx + 1);
} else if (Math.abs(n) === 1) {
this._renderItem(sEle, idx + n);
}
from islider.
正常情况下都是执行else语句,但是从连接返回来,使用islider.slideTo(i)之后,执行的if语句,是这里的问题吗?
from islider.
有可能,感觉问题描述的不是特别清楚,如果有可以访问的地址的话可以看一下。
from islider.
from islider.
lz你好
正在学习这个效果
请教个问题
如果不是当前正中间的图片
他的translateZ是怎么算出来的,让图片正好在容器的边缘???
from islider.
朋友你好,关于iSlider里面详细的逻辑,我还没有仔细研究,目前处于刚会用的阶段,你的这个问题我也不清楚,还是请作者来回答吧,抱歉了
from islider.
你应该先获取location里的index值,然后再new iSlider,让initIndex等于index,另外建议你使用新版本,你使用的这个版本应该没有加入initIndex这个参数
from islider.
作者说的对,我的iSlider确实不是最新版本,因为这不是我开始的一个项目,所以没有考虑到这一点,给作者添麻烦了,很抱歉。按照作者上面给出的方法,问题完美解决,非常感谢作者,帮了我很大的忙,谢谢!
from islider.
Related Issues (20)
- 页面刚刚渲染出来,卡着的怎么办? HOT 2
- 请问方向怎么控制,比如我想让普通的normal效果是从左往右的怎么设置呢。默认是从右往左的动画效果
- 请问,我将bootstrap的container整体装入了左右滑动,但是container内部的上下滑动失效了怎么办 HOT 1
- 横竖屏,会有问题,是因为我移动端,用的rem布局,此时需要赋值height,问题解决了
- Bug: 手指按下 页面背景色会变化
- 建议增加onerror处理 HOT 1
- 发现bug一枚,pause()方法有问题的
- zoompic插件中通过对图片双击或双指放大,在控制台报错
- iSlids插件,antd项目,new iSlids 导致生成多个UI节点,外部使用判断控制了访问限制,所以节点生成这里应该是插件内部导致的,有没有什么解决办法 HOT 1
- webapp开发中,webview预加载时图片叠加问题。 HOT 1
- 建议:可否添加free Mode HOT 1
- 修复plugin在使用npm安装时无法引用的bug
- slideIndex variable HOT 1
- 请问一下iSlider怎么排版按从右往左排列
- 有图片分页功能吗 HOT 5
- 如何设置轮播图(自动播放)每一页不同的时间间隔
- slideChanged 不管用 HOT 2
- bug:当点击内容里的事件时,插件不自动滚动了
- 当content为HTMLElement且数据长度为2,如果其中一个不为img,在轮播时会出现整张空白轮播图
- Errorr
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 islider.