jQuery在其他虚拟主机上无法正常运行 [英] jQuery isn't functioning on different webhost

查看:131
本文介绍了jQuery在其他虚拟主机上无法正常运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚完成了一个网站&去将其上传到客户端的主机,该主机与我用于个人站点的主机相同.当我将网站上传到他的域并作为&测试了jQuery函数,它没有运行.我正在通过以下方式从Google加载jQuery:

I just finished a website & went to upload it to the client's host, which is the same host that I use for my personal site. When I uploaded the site to his domain as an add on & tested the jQuery function, it doesn't run. I'm loading jQuery from Google via:

<!--/ jQuery Inclusion-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>

它在我的个人主机设置上完美运行,只是在新主机上根本不起作用.我打电话给&技术支持没有任何决心,希望你们能帮助我.

And it runs perfectly on my personal host setup, it just doesn't work at all on the new host. I called & got no resolve from tech support, was hoping that you guys could help me out.

Nivo Slider& Fancybox在我的个人网站上工作:

http://tinyurl.com/d3zley7


Nivo Slider& Fancybox在客户网站上不起作用:

http://tinyurl.com/d2egv2v

考虑到不需要将js托管在服务器上,是什么原因导致的?非常感谢您的帮助!

What could be causing this considering it's not required that the js is hosted on the server? I greatly appreciate your help!

推荐答案

不是jQuery问题,或者是因为您所有的脚本引用都返回了404找不到页面"

Is not a jQuery issue or whatsoever, is because all your scripts references return a 404 "page not found"

您的引用从 /文件

<script src="/nivo-slider/jquery.nivo.slider.js" type="text/javascript"></script>
<script src="/nivo-slider/jquery.nivo.slider.pack.js" type="text/javascript"></script>

<!--/ Fancybox Script-->
<script type="text/javascript" src="/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<script type="text/javascript" src="/fancybox/jquery.easing-1.4.pack.js"></script>

...etc

....但它们应该相对于目录nd/,例如

.... but they should be relative to directory nd/ like

<script src="nd/nivo-slider/jquery.nivo.slider.js" type="text/javascript"></script>

... etc

...路径问题也是如此;)

... so is a path issue ;)

这篇关于jQuery在其他虚拟主机上无法正常运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆