开发者

Respond.js for CSS3 Media Queries

I am trying to use Respond.js for CSS3 Media Queries on older IE versions https://github.com/scottjehl/Respond

I am getting some Access denied message in Javascript.

I have tried similar to http://scottjehl.github.com/Respond/cross-domain/example.html

I think there ar开发者_如何学Ce some cross-domain setup to be done...But I am not sure why that is needed. I just need to test everything locally as of now. So I have all the files locally...Please help me fix this issue.

Any other suggestions for similar easy-to-use library would also be fine..


you state that you're running the test on your local hard disk.

According to the Repond.js documentation, you will have issues with this:

Due to security restrictions, some browsers may not allow this script to work on file:// urls (because it uses xmlHttpRequest). Run it on a web server.

So if you're just loading pages from your C: drive, you will need to install a localhost web server to get it working.

Additionally, even if you are running on a web server, if the respond.js file is on a different domain (or subdomain) from your main page, then you will need to do some cross-domain setup.

Again, this is documented; see the section in the documentation entitled "CDN/X-Domain Setup". It includes examples, and references an example file available with the source.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜