如何在简单滑块中悬停时暂停
http://cssglobe。 com/post/4004/easy-slider-15-the-easiest-jquery-plugin-for-sliding
我正在使用简单的滑块作为横幅,我调用下面的脚本来播放
$("#slider").easySlider({
auto: true,
continuous: true,
nextId: "slider1next",
prevId: "slider1prev",
hoverpause: true });
});
它正在正确滑动。但我想暂停滑动,当鼠标悬停在幻灯片上时
http://cssglobe.com/post/4004/easy-slider-15-the-easiest-jquery-plugin-for-sliding
I am using easy slider for banner and I called below script to play
$("#slider").easySlider({
auto: true,
continuous: true,
nextId: "slider1next",
prevId: "slider1prev",
hoverpause: true });
});
It's sliding properly . But I want to pause sliding, While hover on the slide
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
为什么不:
why not:
如果在 mouseout 上,或者按照 mouseleave 的建议,您希望重新启动超时,而不是为下一次使用设置动画:
If on mouseout, or as suggested mouseleave you'd like to restart the timeout instead of it animating to the next use instead:
非常感谢您。下面的代码对我来说工作得很好,因为我只是不想以常规方式暂停,我想暂停滑块并保持鼠标在元素内移动而不被驱动到下一张幻灯片。如果您需要帮助,请随时询问。
Thank you so much bnku. The following piece of code worked perfectly fine for me as I just didnt want to pause the regular way, I wanted to pause the slider and keep the mouse moving within the element without being driven to the next slide. If you need assistance, please feel free to ask.
您必须更改现有的 easySlider1.5.js 以满足您的要求。如您的代码所示,您可以添加新参数
hoverpause: true
在 easySlider1.5.js 中,您必须添加
选项,
最后您还需要添加
Here is full js
& HTML你可以初始化滑块,
You have to alter existing easySlider1.5.js to suit your requirement. As shown in your code you can add new parameter
hoverpause: true
In easySlider1.5.js you have to add
in options,
also at the end you need to add
Here is entire js
& HTML you can initialized slider,