好吧,我確定這是一個簡單的問題,但我拉我的頭髮。航點粘滯不初始
我正試圖使我的頁面上粘貼元素.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]
});
但是我可以ep得到錯誤:
Waypoint.Sticky is not a constructor
我在做什麼錯?
這似乎是一個多回答評論的。 – Saurabh
讓我澄清然後... – Bryan