Galleria works locally in all browsers but only IE8 & Chrome when hosted

一笑奈何 提交于 2019-12-11 16:01:45

问题


This page: http://www.ipjnet.talktalk.net/code/photos.html works in Opera11,Chrome, Firefox3 & IE8 locally.

The same page hosted only loads correctly in IE8 & Chrome

I'm new to galleria and jquery so please be gentle with me as I think I must be missing something very obvious.

Thank You very much


回答1:


The slashes in your script files are the wrong ones...

<script src="galleria\src\jquery-1.4.4.js"></script>
<script src="galleria\src\galleria.js"></script>

should be:

<script src="galleria/src/jquery-1.4.4.js"></script>
<script src="galleria/src/galleria.js"></script>

IE on the "local" machine, (and hosted in Quirks mode) let you get away with this. However on the "Web" the path delimiters are forward slashes only.

As a result of the wrong slashes, jQuery and the Galleria don't load at all in Firefox/(other browsers)




回答2:


    <script src="galleria\src\jquery-1.4.4.js"></script>
    <script src="galleria\src\galleria.js"></script>

should be (forward slash, not back slash)

    <script src="galleria/src/jquery-1.4.4.js"></script>
    <script src="galleria/src/galleria.js"></script>

surprising it works in chrome...




回答3:


The javascript is not being sourced.

I'm guessing firefox doesn't like the backslashes, try forward slashes.

<script src="galleria/src/jquery-1.4.4.js"></script>
<script src="galleria/src/galleria.js"></script>


来源:https://stackoverflow.com/questions/4820234/galleria-works-locally-in-all-browsers-but-only-ie8-chrome-when-hosted

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!