
一款十分简单实用的jQuery手机移动端时分秒时间选择插件,手机网页时分秒选择器代码。
js代码
<script src=\"js/mobileSelect.js\" type=\"text/javascript\"></script>
<script src=\"js/jquery1.8.3.min.js\" type=\"text/javascript\"></script>
<script type=\"text/javascript\">
var numArr1=[\'1\',\'2\',\'3\',\'4\',\'5\',\'6\',\'7\',\'8\',\'9\',\'10\',\'11\',\'12\',\'13\',\'14\',\'15\',\'16\',\'17\',\'18\',\'19\',\'20\',\'21\',\'22\',\'23\',\'24\'];
var numArr2=[\'1\',\'2\',\'3\',\'4\',\'5\',\'6\',\'7\',\'8\',\'9\',\'10\',\'11\',\'12\',\'13\',\'14\',\'15\',\'16\',\'17\',\'18\',\'19\',\'20\',\'21\',\'22\',\'23\',\'24\',\'25\',\'26\',\'27\',\'28\',\'29\',\'30\',\'31\',\'32\',\'33\',\'34\',\'35\',\'36\',\'37\',\'38\',\'39\',\'40\',\'41\',\'42\',\'43\',\'44\',\'45\',\'46\',\'47\',\'48\',\'49\',\'50\',\'51\',\'52\',\'53\',\'54\',\'55\',\'56\',\'57\',\'58\',\'59\',\'60\'];
var mobileSelect3 = new MobileSelect({
trigger: \'#trigger3\',
title: \'选择时间\',
wheels: [
{data: numArr1},
{data: numArr2},
{data: numArr2}
],
position:[0, 0, 0],
//transitionEnd:function(indexArr, data){
// console.log(data);
//},
callback:function(indexArr, data){
//$(\"#trigger3\").html(\"ccccccccccccccccccccc\");
}
});
/**
* 参数说明
* @param trigger(必填参数) 触发对象的id/class/tag
* @param wheels(必填参数) 数据源,需要显示的数据
* @param title 控件标题
* @param position 初始化定位
* @param callback 选择成功后触发的回调函数,返回indexArr(选中的选项索引)、data(选中的数据)
* @param transitionEnd 每一次手势滑动结束后触发的回调函数,返回indexArr(当前选中的选项索引)、data(选中的数据)
*/
</script>










暂无评论内容