仿照大众点评过滤框

模仿大众点评过滤框

相关的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');
                });
我的:
仿照大众点评过滤框

大众点评的:

仿照大众点评过滤框

版权声明:本文为博主原创文章,未经博主允许不得转载。