找不到jquery函数

发布于 2024-12-28 13:55:00 字数 838 浏览 1 评论 0原文

我在使用 Jquery 日期时间选择器时遇到了问题。滑块不适用于触摸设备。幸运的是,已经找到了解决方案,并且 已实现

但是更新 Jquery datetimepicker 代码给了我错误:

$tp.find(".ui-slider:visible").sliderAccess is not a function

这是来自 Jquery Datetime picker 文件本身,所以不是我编写的代码。

我能想到的唯一合乎逻辑的事情是,我缺少依赖项?但没有提及任何一个。

$(".dateTimePicker").datetimepicker({ dateFormat: 'dd/mm/yy' , addSliderAccess: true, sliderAccessArgs: { touchonly: false} }); // dateFormat: 'dd/mm/yy'
$(".datePicker").datepicker({ dateFormat: 'dd/mm/yy', showButtonPanel: true }); // dateFormat: 'dd/mm/yy'
$(".timePicker").timepicker({ stepMinute: 5, addSliderAccess: true, sliderAccessArgs: { touchonly: false} });

有谁知道我做错了什么。

I've been having problems with Jquery Datetime picker. The slider wouldn't work on touch devices. Luckily the solution has since been found and Implemented

But updating the Jquery datetimepicker code, is giving me the error:

$tp.find(".ui-slider:visible").sliderAccess is not a function

This is coming from the Jquery Datetime picker file itself, so is not code I have written.

The only logical thing I can think of is, I'm missing a dependancy? But there is no mention for one.

$(".dateTimePicker").datetimepicker({ dateFormat: 'dd/mm/yy' , addSliderAccess: true, sliderAccessArgs: { touchonly: false} }); // dateFormat: 'dd/mm/yy'
$(".datePicker").datepicker({ dateFormat: 'dd/mm/yy', showButtonPanel: true }); // dateFormat: 'dd/mm/yy'
$(".timePicker").timepicker({ stepMinute: 5, addSliderAccess: true, sliderAccessArgs: { touchonly: false} });

Does anyone know what Im doing wrong.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

森林迷了鹿 2025-01-04 13:55:00

您是否包含所有 .js 文件?查看示例页面的源代码,您可以看到它包括

    <script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="js/jquery-ui-1.8.16.custom.min.js"></script>
    <script type="text/javascript" src="js/jquery-ui-timepicker-addon.js"></script>
    <script type="text/javascript" src="js/jquery-ui-sliderAccess.js"></script>

Are you including all of the .js files? Looking at the source code of example page you can see it's including

    <script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="js/jquery-ui-1.8.16.custom.min.js"></script>
    <script type="text/javascript" src="js/jquery-ui-timepicker-addon.js"></script>
    <script type="text/javascript" src="js/jquery-ui-sliderAccess.js"></script>
温柔少女心 2025-01-04 13:55:00

为方便起见,您可以在此处获取 jquery-ui-sliderAccess.js 文件。从实际的项目页面来看,从哪里获取它并不明显。

http://trentrichardson.com/examples/timepicker/js/jquery-ui -sliderAccess.js

For convenience, this is where you can get that jquery-ui-sliderAccess.js file. It's non-obvious from the actual project page where to get this.

http://trentrichardson.com/examples/timepicker/js/jquery-ui-sliderAccess.js

手心的海 2025-01-04 13:55:00

正如 @CCBlackburn 所说,您缺少滑块,

<script type="text/javascript" src="js/jquery-ui-sliderAccess.js"></script>

我还建议您从 github 网站下载,单击带有云和箭头的 Zip 按钮:

https://github.com/trentrichardson/jQuery-Timepicker-Addon

As @CCBlackburn is saying, you are missing the slider include

<script type="text/javascript" src="js/jquery-ui-sliderAccess.js"></script>

I would also recommend to download from the github website, Click on the Zip button with a Cloud on it and arrow:

https://github.com/trentrichardson/jQuery-Timepicker-Addon

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文