首页 > 其他 > 详细

在弹出框中无法使用select2的问题

时间:2016-08-30 17:25:20      阅读:324      评论:0      收藏:0      [点我收藏+]

通常情况下,使用select2只需要在加载相关js和css后,添加如下代码即可:

$("#selectId").select2();

但如果这个select在弹出框中,这样使用往往是无效的,这时候需要这样写:

$.fn.modal.Constructor.prototype.enforceFocus = function () {$("#selectId").select2(); };

参考https://github.com/select2/select2/issues/1436

在弹出框中无法使用select2的问题

原文:http://www.cnblogs.com/dreamydeng/p/5822435.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!