航路点不是一个突然出现的功能错误

Waypoint not a function error all of a sudden

本文关键字:突然 错误 功能 一个 航路      更新时间:2023-09-26

我创建了一个Wordpress主题,去年它一直运行良好,但现在突然出现以下错误:

未捕获的类型错误:$(…)。航路点不是函数

我已经检查了页面源代码,以确保在调用函数的customjs文件之前加载jQuery和waypoints,所以我不确定出了什么问题。

有什么想法吗?谢谢

通过在我的wordpress enque命令中添加路点来修复问题

wp_enqueue_script( 'luxi-custom-js', get_template_directory_uri() . '/js/luxi-custom-js.js', array('waypoints'), '', true );