一旦移动到 Media Temple 主机,jQuery(Nvio 滑块)就不会在 CodeIgniter 应用程序上触发
我希望有人能立即知道这个问题的答案。我在 Fedora 盒子上开发了这个网站,然后将其移至运行 Ubuntu Svr 10.10/Apache2/PHP5/MySQL5.1 的测试盒子(下面的链接),并且在开发和测试平台上一切正常。
我研究了 Media Temple、Code Igniter(使用 1.7)和过去两天和到目前为止的 jQuery 论坛都找不到类似的问题,其中脚本没有触发该函数,并且我的 js 和 css 路径是正确的。
具体细节:
我已在我的开发和自托管测试服务器上成功运行以下代码,结果通过。一旦相同的代码和相同的数据库被移动到 Media Temple,jQuery 就会停止触发。
测试服务器链接是(因此您可以看到它的工作原理): http://ganymede.likescandy.com/site/ 在查看源代码时,您会看到滑块中的图片,这为我们提供了很好的滑块操作。
失败的 Media Temple 链接是: http://jeffbreece.com/site
未触发的代码Media Temple 托管代码是此函数(但在两个测试主机上均如此):
<!-- script -->
<script type="text/javascript" src="http://localhost/site/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="http://localhost/site/js/jquery.nivo.slider.pack.js"></script>
<script type="text/javascript">
jQuery(function() {
jQuery('#slider').nivoSlider({
effect:'sliceUpDown',
pauseTime:5000,
directionNav:false
});
});
</script>
I am hoping someone might know the answer to this off the top. I have developed this site on a Fedora box, then moved it to my test box (link below) running Ubuntu Svr 10.10/Apache2/PHP5/MySQL5.1 and all works fine through on the dev and test platforms.
I have researched the Media Temple, Code Igniter (using 1.7) & jQuery forums for the past two days and so far and can't find a similar issue where the script does not fire the function and my js and css paths are correct.
Specifics:
I have run the following code successfully on my development and self hosted test server with results that pass. Once the same code and same database is moved to Media Temple the jQuery stops firing.
The test server link is (so you can see it work): http://ganymede.likescandy.com/site/
On view source you see the pictures in the slider which give us that nice slider action.
The Media Temple link where it fails is: http://jeffbreece.com/site
The code that is not firing on the Media Temple hosted code is this function (but does on both the test hosts):
<!-- script -->
<script type="text/javascript" src="http://localhost/site/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="http://localhost/site/js/jquery.nivo.slider.pack.js"></script>
<script type="text/javascript">
jQuery(function() {
jQuery('#slider').nivoSlider({
effect:'sliceUpDown',
pauseTime:5000,
directionNav:false
});
});
</script>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如我所看到的,jQuery 代码没有被加载。 Chrome 在最小化版本中抛出一个错误,这表明某些数字犯了错误,这导致 jQuery 无法完全加载。页面加载后,jQuery 未定义,因此您的脚本有问题,要么是格式最小化,要么是其他问题。
是的,我发现了,这两个 jQuery 文件是不同的。打开这两个 jQuery 文件,然后我滚动并看到它们不同......
the jQuery code dose not get loaded as I can see. Chrome throws an error in the minimized version, which is saying that some number made the error, which results in jQuery not get loaded fully. After pageload, jQuery is undefined, so you have a problem with you script, either mallformed minimized or somethin else.
Yeah I found it, the two jQuery files are different. Open both jQuery files, i then scrolled and saw that they differ...