我正在研究jquery滑块(序列主视差)。我想在顶部添加一个菜单,允许用户跳转到每张幻灯片。我的问题是我没有设法将我的href链接到我的div id。实际上,我不知道该怎么办。例如,当您单击菜单1时,它将转到具有div id =“menu1”的幻灯片。如果我在<li class="animate-in"> <div id="menu1"> ... </div></li>
之间添加它会破坏所有动画,这是我的另一个问题。
这里的代码:
序列主题演示 - 滑动水平视差
if(typeof jQuery =='undefined'){
document.write(unescape('%3Cscript src =“../../ scripts / jquery-min.js”%3E%3C / script%3E'));
}
</head>
<body>
<menu-->
<nav>
<ul>
<li><a href="#">menu 1</a></li>
<li><a href="#">menu 2</a></li>
</ul>
</nav>
<!--end menu-->
<div id="sequence">
<img class="sequence-prev" src="images/bt-prev.png" alt="Previous" />
<img class="sequence-next" src="images/bt-next.png" alt="Next" />
<ul class="sequence-canvas">
<li class="animate-in">
<div class="info">
<h2>Built using Sequence.js</h2>
<p>The Responsive Slider with Advanced CSS3 Transitions</p>
</div>
<img class="sky" src="images/bg-clouds.png" alt="Blue Sky" />
<img class="balloon" src="images/balloon.png" alt="Balloon" />
</li>
<li>
<div class="info">
<h2>Creative Control</h2>
<p>Create unique sliders using CSS3 transitions -- no jQuery knowledge required!</p>
</div>
<img class="sky" src="images/bg-clouds.png" alt="Blue Sky" />
<img class="aeroplane" src="images/aeroplane.png" alt="Aeroplane" />
</li>
<li>
<div class="info">
<h2>Cutting Edge</h2>
<p>Supports modern browsers, old browsers (IE7+), touch devices and responsive designs</p>
</div>
<img class="sky" src="images/bg-clouds.png" alt="Blue Sky" />
<img class="kite" src="images/kite.png" alt="Kite" />
</li>
</ul>
</div>
</body>
答案 0 :(得分:0)
添加像这样的href链接
<a href="your link">
<li class="animate-in">
<div class="info">
<h2>Built using Sequence.js</h2>
<p>The Responsive Slider with Advanced CSS3 Transitions</p>
</div>
<img class="sky" src="images/bg-clouds.png" alt="Blue Sky" />
<img class="balloon" src="images/balloon.png" alt="Balloon" />
</li>
</a>