Galleria works locally in all browsers but only IE

2019-09-04 07:20发布

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

3条回答
Luminary・发光体
2楼-- · 2019-09-04 07:56

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>
查看更多
唯我独甜
3楼-- · 2019-09-04 08:04
    <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...

查看更多
甜甜的少女心
4楼-- · 2019-09-04 08:05

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)

查看更多
登录 后发表回答