目前还没有最新动态
];
$(function(){
$(".tabbreadcrumb>ul>li>a").bind("click", function () {
$(this).parent().parent().find("li").removeClass("current");
$(this).parent().addClass("current");
$(".catalogue").hide().eq($(this).parent().index()).show();
});
$(".tabbreadcrumb>ul>li").eq(0).find("a").click();
$('#btn_close').click(function(){
zone_close();
});
var provinces = $.map(dataSource,function(val){
return val.province;
});
provinces = filterArray(provinces);
$.each(provinces,function(key,val){
$('#s1').append('');
})
$('#s1').bind('change',function(){
var $v = $(this).val();
$('#s2').find('option:gt(0)').remove();
if($v==''){
zone_close();
}
else{
var result = $.grep(dataSource,function(val,key){
if(val.province == $v){
return true;
}
else{
return false;
}
});
var citys = $.map(result,function(val){
return val.city;
});
citys = filterArray(citys);
$.each(citys,function(key,val){
$('#s2').append('');
});
zone_show($v,'',1);
}
});
$('#s2').bind('change',function(){
var $v = $(this).val();
if($v==''){
zone_close();
}
else{
zone_show($('#s1').val(),$v,2);
}
});
});
function zone_close(){
$('#mylist').empty();
$('#myzone').hide();
}
function zone_show(p,c,type){
$('#mylist').empty();
var result = null;
if(type == 1){
result = $.grep(dataSource,function(val,key){
if(val.province == p){
return true;
}
else{
return false;
}
});
}
else{
result = $.grep(dataSource,function(val,key){
if(val.city == c){
return true;
}
else{
return false;
}
});
}
if(result == null){
zone_close();
}
$.each(result,function(key,val){
$('#mylist').append(''+val.city+' '+val.name+' ');
});
$('#mytitle').text(p+' '+c+'汽车膜经销商');
$('#myzone').show();
}
function setProvince(p){
var $v = p;
if($v!=''){
$('#s2').find('option:gt(0)').remove();
$('#s1').find('option').removeAttr('selected');
$('#s1').find('option[value="'+p+'"]').attr('selected','selected');
var result = $.grep(dataSource,function(val,key){
if(val.province == $v){
return true;
}
else{
return false;
}
});
$.each(result,function(key,val){
$('#s2').append('');
});
zone_show($v,'',1);
}
}
授权汽车膜经销商查询
省份(直辖市):
城市:
全国统一服务热线:400 100 2450
