我有一个顶部导航,可以在 safari 和 chrome 上很好地呈现,主要是在 Firefox 上,除了一页。此页面正在使用 Jquery Cycle 插件 - 当我禁用它时,导航显示正常。奇怪的是,我在其他页面上使用了 Cycle 插件,并且没有任何问题,只是在这一页上它决定隐藏导航,我不知道为什么!这是我的完整代码-> http://jsfiddle.net/surajkap/4zZPN/
以下是重点:
<ul class = "navigation-bar">
<li><a href="/contact" class = "nav-link">CONTACT</a></li>
<li><a href="/clients" class = "nav-link">CLIENTS</a></li>
<li><a href="/personal" class = "nav-link">PERSONAL</a></li>
<li><a href="/fashion" class = "nav-link">FASHION</a></li>
<li><a href="/portrait" class = "nav-link">PORTRAITS</a></li>
<li><a href="/party" class = "nav-link">PARTIES</a></li>
</ul>
<div class = "slideshow">
{% for photo in gallery %}
<div class = "slide">
<img class = "gallery-image" src ="{{ photo.image.url }}"/>
<div class = "caption-container">
{% for client in photo.client.all %}
<div class = "client">client: {{ client.name }}
<div class = "slide-nav"></div>
</div>
{% endfor %}
<span class = "caption">{{ photo.caption }}</span>
</div>
</div>
{% endfor %}
</div>
CSS...
.navigation-bar {
width: 100%;
float: right;
margin: 0px;
padding: 0px;
list-style: none;
background-color: black;}
和 Jquery...
$(document).ready(function(){
$(".slideshow")
.cycle({
fx: 'scrollHorz',
next: '.right-arrow',
prev: '.left-arrow',
timeout: 0,
pager: '.slide-nav',
pagerAnchorBuilder: function paginate(idx, el) {
return '<a class="bullet" href="#" >•</a>'
}
});
});