简体   繁体   English

托管时视差不起作用

[英]Parallax not working when hosted

header doesn't work at augiepark.com 标头在augiepark.com上不起作用

Local preview works fine, but it's when the site is hosted when the parallax stops working. 本地预览工作正常,但是当视差停止工作时是在托管网站时。

Can any one help? 可以帮忙吗?

<div id="scene">
        <div class="layer" data-depth=".1">
          <div class="layer3"></div>
        </div>
        <div class="layer" data-depth="0.3">
          <div class="layer1"></div>
        </div>
        <div class="layer" data-depth="0.4">
          <div class="layer2"></div>
        </div>
 </div>

JS: JS:

$(document).ready(function(){
    $('#scene').parallax();
}); 

In my portfolio, the js is located on line 535 but I'm not sure if that's the right area it should be in 在我的投资组合中,js位于535行,但是我不确定这是否应该在正确的区域中

I see you call jquery library several times on that page. 我看到您在该页面上多次调用了jquery库。 Can you try to remove some and put only one of these lines ? 您可以尝试删除其中一些并仅放置其中之一吗?

<script src='js/jquery.min.js'></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-alpha1/jquery.min.js"></script>
<script src='//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM