试试这个:
$(document).ready(function() {
$('[id="Slider-First Slider-Common"]').hide();
$(".Bottom-Button a").click(function() {
$('[id="Slider-First Slider-Common"]').show();
return false;
});
});
PS你不应该在元素中使用空格id
。
编辑再次阅读您的问题,需要进行一些修改。
$('.Slider-Item').hide();
$('.Bottom-Button a').on('click',function(){
$(this).hide();
$('.Slider-First').show();
return false;
});
$('.Slider-First').on('click',function(){
$('.Slider-First').hide();
$('.Slider-Second').show();
return false;
});
进一步编辑
$('.Slider-Item').hide();
$('.Bottom-Button a').on('click',function(){
$(this).hide();
$('.Slider-First').show();
return false;
});
$('.Slider-Item').on('click',function(){
if ($(this).next().length > 0) {
$(this).hide();
$(this).next().show();
}
return false;
});
小提琴:http: //jsfiddle.net/9p9sg/