简体   繁体   English

粘性导航不太粘性

[英]Sticky Navigation Not so sticky

My sticky navigation worked fine until I uploaded it to the server. 我的粘性导航工作正常,直到将其上传到服务器为止。 Now the navigation doesn't stick to the stop, and the logo image appears to be behind one of the content DIVS. 现在导航不再停止,徽标图像似乎位于内容DIVS之一的后面。 Please any help would be most helpful thank you. 请任何帮助将是最有帮助的,谢谢。

http://christophersharrett.com/ http://christophersharrett.com/

Your problem is your $('.nav').scrollToFixed(); 您的问题是您的$('.nav').scrollToFixed(); has not loaded yet therefore erroring - so scrollToFixed() function does not exist 尚未加载,因此会出错-因此scrollToFixed()函数不存在

if you look in your console log this file is returning a 404: 如果您在控制台日志中查找,则此文件返回404:

jquery-scrolltofixed-min.js

you are referring 你指的是

<script src="js/jquery-scrolltofixed-min.js" type="text/javascript"></script>

which is 这是

http://christophersharrett.com/js/jquery-scrolltofixed-min.js = 404 (can not be found)

you need to make sure that your script is in a js folder in that structure on the server for it to work. 您需要确保脚本在服务器上该结构的js文件夹中,才能正常工作。 Find where that script is and either change your reference above or move it to the correct file structure. 查找该脚本的位置,然后在上面更改参考或将其移至正确的文件结构。

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

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