码迷,mamicode.com
首页 > 其他好文 > 详细

bootstrap 模态框兼容ie9

时间:2018-11-07 12:30:59      阅读:232      评论:0      收藏:0      [点我收藏+]

标签:highlight   for   ide   button   dial   modal   func   ndt   dialog   

项目中的模态框在其他浏览器中没有问题,但是在ie9下,show事件不触发

bootbox.dialog({
			message: $("#T_BZJ_AccassForm"),
			title: "<i class=‘fa fa-th red margin-right-5‘></i>"+dialogtitle,
			className:"modals-border-raduis modal-width-800",
			buttons: {
				"取消": {
					className: ""
				}
			}
		}).on(‘shown.bs.modal‘, function () {
//此处不触发
			$(‘#T_BZJ_AccassForm‘).show();
		}).on(‘hide.bs.modal‘, function (e) {
			$(‘#T_BZJ_AccassForm‘).hide().appendTo(‘#T_BZJ_AccassEdit‘);
		}).modal(‘show‘);

  后同事发现,只要改为

bootbox.dialog({
			message: $("#T_BZJ_AccassForm"),
			title: "<i class=‘fa fa-th red margin-right-5‘></i>"+dialogtitle,
			className:"modals-border-raduis modal-width-800",
			buttons: {
				"取消": {
					className: ""
				}
			}
		}).on(‘show.bs.modal‘, function () {
			$(‘#T_BZJ_AccassForm‘).show();
		}).on(‘hide.bs.modal‘, function (e) {
			$(‘#T_BZJ_AccassForm‘).hide().appendTo(‘#T_BZJ_AccassEdit‘);
		}).modal(‘show‘);

  即可 !

即将

shown.bs.modal改为
show.bs.modal

 

bootstrap 模态框兼容ie9

标签:highlight   for   ide   button   dial   modal   func   ndt   dialog   

原文地址:https://www.cnblogs.com/suiyide/p/9921822.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!