对于 jQuery Touch Punch,您必须下载 jquery.ui.touch-punch.js。我想知道我必须把这个文件放在哪里?
实施它的第二步是
Include Touch Punch after jQuery UI and before its first use.
为什么我必须在之前和之后而不是之前包括它?
对于 jQuery Touch Punch,您必须下载 jquery.ui.touch-punch.js。我想知道我必须把这个文件放在哪里?
实施它的第二步是
Include Touch Punch after jQuery UI and before its first use.
为什么我必须在之前和之后而不是之前包括它?
我认为您可能误读了文档。这只是意味着您必须在加载 Touch Punch 之前加载 JQuery UI,显然,必须在使用它的任何功能之前加载 Touch Punch。
基本上,您的 HTML 文件应如下所示:
<html>
<head>
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script src="http://code.jquery.com/ui/1.8.21/jquery-ui.min.js"></script>
<script src="jquery.ui.touch-punch.min.js"></script>
</head>
<body>
<!--Content-->
<script>
/*Javascript actually using touch punch*/
</script>
</body>
</html>