jQuery 范围滑块事件触发
使用 jQuery Range Slider 插件时出现问题。我想在每次滑块更改时触发一个事件。
我不知道哪个元素可以触发事件。例如,我想要一条警报消息,看看它是否有效。
谢谢
彼得
there`s a problem using the jQuery Range Slider plugin. I want to trigger an event every time the slider changed.
I don`t know on which elemt i can trigger events. For exmaple i wana have an alert message ro see if it works.
Thanks
Peter
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要在用户停止移动旋钮后获取滑块值,请使用
change
,否则使用input
在旋钮移动时接收更新。To get the slider value once the user has stopped moving the knob use
change
otherwise useinput
to receive updates as the knob is moved.您可以使用 4 个可能的事件。查看文档中的事件==> http://jqueryui.com/demos/slider/
您可以使用
事件。
如果您想在每次更改滑块时执行一个功能,请尝试
change
。假设您的幻灯片是 id 为
slider
的元素:There are 4 possible events you can use. Look under events in the docs ==> http://jqueryui.com/demos/slider/
You can use the
events.
If you want to do a function everytime the slider is changed try
change
.Let's say your slide is an element with id of
slider
: