summaryrefslogtreecommitdiffstats
path: root/jquery.multiple.select.js
diff options
context:
space:
mode:
Diffstat (limited to 'jquery.multiple.select.js')
-rw-r--r--jquery.multiple.select.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/jquery.multiple.select.js b/jquery.multiple.select.js
index de1715c..f543296 100644
--- a/jquery.multiple.select.js
+++ b/jquery.multiple.select.js
@@ -12,7 +12,7 @@
function MultipleSelect($el, options) {
var that = this,
name = $el.attr('name') || options.name || '',
- elWidth = $el.width();
+ elWidth = $el.outerWidth();
this.$el = $el.hide();
this.options = options;
@@ -28,10 +28,7 @@
if (this.$el.prop('disabled')) {
this.$choice.addClass('disabled');
}
- this.$choice.css('width', elWidth + 'px');
- this.$drop.css({
- width: (options.width || elWidth) + 'px'
- });
+ this.$parent.css('width', options.width || elWidth);
if (!this.options.keepOpen) {
$('body').click(function(e) {
@@ -241,7 +238,7 @@
this.$drop.css({
'top': 'auto',
'left': 'auto'
- })
+ });
}
this.options.onClose();
},