简体   繁体   中英

jQuery waypoints not working on localhost

I'm trying to use jQuery . From jQuery Waypoints I downloaded the example shortcut for infinite scroll. When I checked the web console it gives the following error when it hits the end of the page.

XMLHttpRequest cannot load 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!!

Apart from opening Chrome and allow access to the file from other files...

An href link says:

<a href=".">

I changed it to the absolute path. It's working fine for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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