Skip to content

Commit 7534dd6

Browse files
committed
Added option to append a string to the source's ID and set the ID attribute on the element
1 parent 1436e73 commit 7534dd6

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)