diff options
author | Tomasz Knyziak <t.knyziak@gmail.com> | 2014-11-10 07:34:59 +0100 |
---|---|---|
committer | Tomasz Knyziak <t.knyziak@gmail.com> | 2014-11-10 07:34:59 +0100 |
commit | c986b29ce68e71fccbf2077bf4f9ea5757b9f671 (patch) | |
tree | 6e36fb8084e7dc991c35c4f8c8151b2f6d1aa2c4 | |
parent | fae1b8cdeaad783d2ff22ecdbb595b5d215b86fb (diff) | |
download | multiple-select-c986b29ce68e71fccbf2077bf4f9ea5757b9f671.zip multiple-select-c986b29ce68e71fccbf2077bf4f9ea5757b9f671.tar.gz multiple-select-c986b29ce68e71fccbf2077bf4f9ea5757b9f671.tar.bz2 |
Fixed the fix - when there was no label, an error occured.
-rw-r--r-- | jquery.multiple.select.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/jquery.multiple.select.js b/jquery.multiple.select.js index 4952843..da062fe 100644 --- a/jquery.multiple.select.js +++ b/jquery.multiple.select.js @@ -178,9 +178,7 @@ that[that.options.isOpen ? 'close' : 'open'](); } - var escapedId = this.$el.attr('id').split(':').join('\\:'); - - var label = this.$el.parent().closest('label')[0] || $('label[for=' + escapedId + ']')[0]; + var label = this.$el.parent().closest('label')[0] || $('label[for=' + this.$el.attr('id').split(':').join('\\:') + ']')[0]; if (label) { $(label).off('click').on('click', function (e) { |