您的位置:首页 > Web前端 > JavaScript

模仿大众点评过滤框

2015-07-09 10:33 549 查看
相关的js代码:

$('#control-part-1').click(function(){
$(this).css('backgroundColor','#fff');
$('#part-1').css('display','block');
$(this).siblings().css('backgroundColor','#eee');
$('#part-1').siblings('.right-part').css('display','none');
});
$('#control-part-2').click(function(){
$(this).css('backgroundColor','#fff');
$('#part-2').css('display','block');
$(this).siblings().css('backgroundColor','#eee');
$('#part-2').siblings('.right-part').css('display','none');
});
$('#control-part-3').click(function(){
$(this).css('backgroundColor','#fff');
$('#part-3').css('display','block');
$(this).siblings().css('backgroundColor','#eee');
$('#part-3').siblings('.right-part').css('display','none');
});
$('#control-part-4').click(function(){
$(this).css('backgroundColor','#fff');
$('#part-4').css('display','block');
$(this).siblings().css('backgroundColor','#eee');
$('#part-4').siblings('.right-part').css('display','none');
});我的:


大众点评的:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  javascript