diff options
author | 文翼 <wenzhixin2010@gmail.com> | 2015-06-13 12:13:39 +0800 |
---|---|---|
committer | 文翼 <wenzhixin2010@gmail.com> | 2015-06-13 12:13:39 +0800 |
commit | de527091bfb0e4e0b172db5adbf8992783f5f18f (patch) | |
tree | b3887a66d32026cf2a28baaeccd3ba638fe8c548 | |
parent | 5f4dfcdadb9a44e1e6f38cdfaef189c26f46b349 (diff) | |
parent | f7153e19fba11109923066d8c8b8cd55c72d8a3f (diff) | |
download | multiple-select-de527091bfb0e4e0b172db5adbf8992783f5f18f.zip multiple-select-de527091bfb0e4e0b172db5adbf8992783f5f18f.tar.gz multiple-select-de527091bfb0e4e0b172db5adbf8992783f5f18f.tar.bz2 |
Merge pull request #160 from danielgindi/master
Keep original styling of the parent element
-rw-r--r-- | jquery.multiple.select.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/jquery.multiple.select.js b/jquery.multiple.select.js index 27a2d5a..e208ec4 100644 --- a/jquery.multiple.select.js +++ b/jquery.multiple.select.js @@ -13,9 +13,10 @@ var that = this, name = $el.attr('name') || options.name || '' + var originalParentStyle = $el.parent().attr('style') || ''; $el.parent().hide(); var elWidth = $el.css("width"); - $el.parent().show(); + $el.parent().show().attr('style', originalParentStyle); if (elWidth=="0px") {elWidth = $el.outerWidth()+20} this.$el = $el.hide(); |