jQuery手机端省市二级联动选择代码

jQuery手机端省市二级联动选择代码-精品资源网
jQuery手机端省市二级联动选择代码
此内容为免费资源,请登录后查看
0
免费资源

jQuery手机端省市二级联动选择代码

jQuery手机端省市二级联动选择代码是一款非常实用的城市选择器插件。

两级联动选择插件调用:
$(\'.select-value\').mPicker({
    //级别
    level:2,
    //需要渲染的json,二级联动的需要嵌套子元素,有一定的json格式要求
    dataJson:dataJson,
    //true:联动
    Linkage:true,
    //显示行数
    rows:6,
    //默认值填充
    idDefault:true,
    //分割符号
    splitStr:\'-\',
    //头部代码
    header:\'<\\div class=\"mPicker-header\">两级联动选择插件<\\/div>\',
    confirm:function(){
        //更新json
        this.container.data(\'mPicker\').updateData(level3);
        //console.info($(\'.select-value\').data(\'value1\')+\'-\'+$(\'.select-value\').data(\'value2\'));
    },
    cancel:function(){
        //console.info($(\'.select-value\').data(\'value1\')+\'-\'+$(\'.select-value\').data(\'value2\'));
    }
})
//返回的实例对象,
//包含showPicker,hide,updateData等方法
// var method= $(\'.select-value\').data(\'mPicker\');
// console.info(method)
// method.showPicker();
// method.hide(function(){
//     console.info(this)
// });

© 版权声明
THE END
点赞0 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容