jQuery手机端预约时间选择代码

jQuery手机端预约时间选择代码-精品资源网
jQuery手机端预约时间选择代码
此内容为免费资源,请登录后查看
0
免费资源

jQuery手机端预约时间选择代码

一款简洁美观的jQuery手机端点击遮罩弹出预约时间选择代码,适合做移动端时间选择功能。默认参数通过url末尾数值传递“?type=33 ?type=34 ?type=35 ” 自行选择修改。

js代码

<script src=\"js/jquery.min.js\" type=\"text/javascript\" ></script>
<script src=\"js/jquery.promptu-menu.js\" type=\"text/javascript\"></script>
<script type=\"text/javascript\">
$(function() {
	var type = 1;
	
	if (type == 1) {
		var type_ = \'hour\';
		var length_ = 1;
	} else {
		if (type == 2 || type == 3) {
			var type_ = \'hour\';
		} else {
			var type_ = \'halfHour\';
		}
		var length_ = 3;
	}

	var nowDateArray = getNowFormatDate().split(\' \');
	var date_ = nowDateArray[0];
	//var type_ = \'halfHour\'; 
	t(date_, type_, length_);
	$(\'.mask-time\').height($(window).height());


	$(\'#doc-select-1\').click(function() {
		$(\'.mask-time,.time-area\').show();

	});
	if ($(\'#fill_infomation_date_start1\').val() == \"请选择开始时间\") {
		$(\'#fill_infomation_date_start1\').css(\'color\', \'#afb2b2\')
	} else {
		$(\'#fill_infomation_date_start1\').css(\'color\', \'#333\')
	}
	$(\'.btn-choose-time\').click(function() {
		$(\'#fill_infomation_date_start1\').css(\'color\', \'#333\')
		if (!$(\'input[name=time_]\').val()) {
			return alert(\'请选择服务时间\');
		}
		var textTime = $(\'input[name=time_]\').val().split(\':\');
		$(\'#fill_infomation_date_start1\').val($(\'input[name=date_]\').val() + \' \' + textTime[0] + \':\' + textTime[1]);
		$(\'input[name=start_time]\').val($(\'input[name=date_]\').val() + \' \' + textTime[0] + \':\' + textTime[1] + \':00\');
		$(\'.mask-time,.time-area\').css(\"display\", \"none\");
		$(\'#doc-select-1\').attr(\'value\', 2);
	});

});
</script>

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

昵称

取消
昵称表情代码图片

    暂无评论内容