【发布时间】:2016-11-14 19:37:11
【问题描述】:
好的,我确定这是一个简单的问题,但我正在拔头发。
我正在尝试使元素 .subheads_wrapper 粘在我的页面上。
我已将最新的航点文件放在 Inetpub\wwwroot\includes\waypoints-master 下。
我的页面在Inetpub\wwwroot\mypage\index.php
在标题中,我附上了我认为正确的文件:
<script src="../includes/waypoints-master/lib/jquery.waypoints.min.js"></script>
<script src="../includes/waypoints-master/lib/shortcuts/sticky.min.js"></script>
css:
.stuck {
position:fixed;
top:0;
}
jquery:
var sticky = new Waypoint.Sticky({
element: $('.subheads_wrapper')[0]
});
但我不断收到错误:
Waypoint.Sticky 不是构造函数
我做错了什么?
【问题讨论】: