0
我正在開發一個視差組合網站,並希望包含一些jquery功能。目前我有一個有效的下拉畫廊,但我想向畫廊添加點導航。一旦我添加了點導航,下拉功能停止工作。我已經在jsfiddle上建立了一個例子。第一個鏈接顯示下拉菜單功能。 (目前同時打開每個畫廊。)第二個鏈接添加點導航。下拉式圖庫中的jquery點導航
http://jsfiddle.net/carincamen/pvphpcuw/12/
HTML:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<body>
<p>Click the small black box to show the large rectangle box.</p>
<img class="arrow">
<div class="gallery"></div>
CSS:
.gallery {
position: relative;
width: 620px;
height: 215px;
top: 30px;
left: 50px;
background-color: rgb(0,0,0);
}
.arrow{
position: relative;
width:20px;
height: 20px;
top: 15px;
left: 340px;
background-color: rgb(0,0,0);
}
的jQuery:
$(document).ready(function(){
var display =$('.gallery');
$(display).hide();
$('.arrow').click(function(){
$(display).toggle();
});
});
http://jsfiddle.net/carincamen/pvphpcuw/
爲了便於演示,我用顏色編碼了點導航按鈕以與幻燈片相對應。
非常感謝您的幫助。非常感謝。