我试图将smoothState.js实现为自定义的WordPress主题,但是当我在导航上悬停时,我可以看到以下错误:
Uncaught TypeError: ajaxRequest.success is not a function
fetch @ jquery.smoothState.js:352
hoverAnchor @ jquery.smoothState.js:539
dispatch @ jquery.min.js:3
q.handle @ jquery.min.js:3ajaxRequest似乎不起作用(jquery.smoothState.js):
ajaxRequest.success(function (html) {
utility.storePageIn(cache, settings.url, html, elementId);
$container.data('smoothState').cache = cache;
});所以,当我点击更改页面,我停留在步骤“是-加载”类,有人能帮我吗?
发布于 2016-09-22 00:44:38
您可能获取了jQuery版本3.0,并如docs:http://api.jquery.com/jquery.ajax/中所述
不推荐的注意事项: jqXHR.success()、jqXHR.error()和jqXHR.complete()回调将从jQuery 3.0开始删除。您可以使用jqXHR.done()、jqXHR.fail()和jqXHR.always()代替。
如果你的版本低于你将是安全的!
干杯!
https://stackoverflow.com/questions/39492779
复制相似问题