jQuery Waypoints错误:粘滞方法不存在 [英] jQuery Waypoints Error: The sticky method does not exist

查看:65
本文介绍了jQuery Waypoints错误:粘滞方法不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 jQuery Waypoints 插件将一个元素粘贴到WordPress的页面顶部。

I want to stick an element to the top of the page in WordPress, using jQuery Waypoints plugin.

<script src="path/to/waypoints.min.js"></script>
<script>
  $('#myelement').waypoint('sticky');
</script>

但控制台说:


错误:jQuery Waypoints中不存在粘滞方法。

Error: The sticky method does not exist in jQuery Waypoints.

我错过了什么?

推荐答案

您是否在常规 waypoints.js <上添加了粘滞快捷方式脚本 / code>?

Did you include the sticky shortcut script on top of your normal waypoints.js?

<script src="path/to/waypoints.min.js"></script>
<script src="path/to/waypoints-sticky.min.js"></script>

参见 Sources 文档

这篇关于jQuery Waypoints错误:粘滞方法不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆