antife-yinyue / jquery.switchable Goto Github PK
View Code? Open in Web Editor NEWHome Page: http://switchable.mrzhang.me/
Home Page: http://switchable.mrzhang.me/
在实际项目中遇到一个需求,需要滚动的元素显示宽度需要随着浏览器而改变,这就要求监听 window 的 resize 事件来进一步处理,在用户改变窗口大小后,我需要重新初始化一个新的对象来处理当前显示宽度下的页面滚动效果,这时候需要清理之前对象的相关资源。
1.通过effect:"scrollRight"来实现动画滚动,当初始化页面之后,在默认的第一张图片往最后一张图片切换时。首先不会显示出图片,当动画结束时才会出现图片,有一个不连续的过程。
2.动画执行的过程中如果点击prev或者next会出现两张图片同时切换的情况,如果快速多次点击也会出现更多,可否添加一个属性(动画在执行过程中设置为真)来判断轮播动画是否在进行,和autoPlay的那个不一样的。
3.能否添加afterSwitch函数?
4.还有个是在var sw = $('#id').switchable({})这个里面使用onSwitch函数时有个bug(貌似是和switchTo有关),上次用的时候遇见了,等我记起来了再来提问,不过这个问题可以以sw.switchTo()这种方式解决。
望楼主解答,多谢!
我想使用Mousewheel进行图片切换,望指教!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.