瀏覽代碼

allow a custom function for computing the width. fixes #252

Igor Vaynberg 13 年之前
父節點
當前提交
b672d760ac
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      select2.js

+ 2 - 0
select2.js

@@ -1151,6 +1151,8 @@
                     }
 
                     return null;
+                } else if ($.isFunction(this.opts.width)) {
+                    return this.opts.width();
                 } else {
                     return this.opts.width;
                }