Skip to content

Commit d120f83

Browse files
committed
Merge pull request #183 from matt328/master
Added new option: appendId. This allows a mapping of a label to the combobox for accessibility compliance.
2 parents 9c77a89 + 7534dd6 commit d120f83

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

js/bootstrap-combobox.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@
9797

9898
, transferAttributes: function() {
9999
this.options.placeholder = this.$source.attr('data-placeholder') || this.options.placeholder
100+
if(this.options.appendId !== "undefined") {
101+
this.$element.attr('id', this.$source.attr('id') + this.options.appendId);
102+
}
100103
this.$element.attr('placeholder', this.options.placeholder)
101104
this.$target.prop('name', this.$source.prop('name'))
102105
this.$target.val(this.$source.val())

0 commit comments

Comments
 (0)