简体   繁体   English

jQuery航路点在localhost上不起作用

[英]jQuery waypoints not working on localhost

I'm trying to use jQuery . 我正在尝试使用jQuery From jQuery Waypoints I downloaded the example shortcut for infinite scroll. 我从jQuery Waypoints下载了无限滚动示例快捷方式。 When I checked the web console it gives the following error when it hits the end of the page. 当我检查Web控制台时,它到达页面末尾时出现以下错误。

XMLHttpRequest cannot load file:///Users/akash.bansal/Downloads/imakewebthings-jquery-waypoints-415eb55/shortcuts/infinite-scroll/. XMLHttpRequest无法加载file:///Users/akash.bansal/Downloads/imakewebthings-jquery-waypoints-415eb55/shortcuts/infinite-scroll/。 Received an invalid response. 收到无效的回应。 Origin 'null' is therefore not allowed access.` 因此,不允许访问原始“空”。

Edit 编辑

Well, that error came because I was accessing a file from a file which got resolved when I allowed the file access in Chrome, but the jQuery-infinite scroll is still not working on localhost!! 好吧,出现此错误是因为我正在访问文件中的文件,当我允许在Chrome中访问文件时,文件已解决,但是jQuery无限滚动仍无法在localhost上运行!

Apart from opening Chrome and allow access to the file from other files... 除了打开Chrome浏览器,并允许从其他文件访问文件...

An href link says: href链接显示:

<a href=".">

I changed it to the absolute path. 我将其更改为绝对路径。 It's working fine for me. 对我来说很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM