Browse Source

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

Igor Vaynberg 13 years ago
parent
commit
b672d760ac
1 changed files with 2 additions and 0 deletions
  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;
                }