【发布时间】:2016-10-26 02:01:19
【问题描述】:
我在我的 rails 项目中使用航路点。 (使用 gem waypoints_rails)
Waypoints 在我希望它运行的页面上运行良好。我使用航点的元素仅存在于此页面上。我正在使用 Waypoint Inview。
var inview = new Waypoint.Inview({
element: $('#the-element')[0],
entered: function(direction) {
console.log("working");
}
});
这工作正常。
但是,我的主页现在出现了这个错误:
Uncaught Error: No element option passed to Waypoint constructor
有什么帮助吗?
【问题讨论】:
标签: jquery ruby-on-rails jquery-waypoints