Skip to content

Commit 22270f2

Browse files
committed
Fix #650
No longer attempting to add an ID if source select did not have one. Added a test to account for this.
1 parent 41c27af commit 22270f2

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

src/jquery.multiselect.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* jshint forin:true, noarg:true, noempty:true, eqeqeq:true, boss:true, undef:true, curly:true, browser:true, jquery:true */
22
/*
3-
* jQuery MultiSelect UI Widget 1.15pre
3+
* jQuery MultiSelect UI Widget 1.16pre
44
* Copyright (c) 2012 Eric Hynds
55
*
66
* http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/
@@ -60,7 +60,7 @@
6060
var button = (this.button = $('<button type="button"><span class="ui-icon ui-icon-triangle-1-s"></span></button>'))
6161
.addClass('ui-multiselect ui-widget ui-state-default ui-corner-all')
6262
.addClass(o.classes)
63-
.attr({ 'title':el.attr('title'), 'tabIndex':el.attr('tabIndex'), 'id': el.attr('id') + '_ms' })
63+
.attr({ 'title':el.attr('title'), 'tabIndex':el.attr('tabIndex'), 'id': el.attr('id') ? el.attr('id') + '_ms' : null })
6464
.prop('aria-haspopup', true)
6565
.insertAfter(el),
6666

0 commit comments

Comments
 (0)