Skip to content

Commit

Permalink
inherits select id
Browse files Browse the repository at this point in the history
  • Loading branch information
silviomoreto committed Nov 29, 2012
1 parent 417a1e5 commit 102672e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bootstrap-select.js
Expand Up @@ -19,10 +19,14 @@
this.$element.css('display', 'none');
var classList = this.$element.attr('class').split(/\s+/);
var template = this.getTemplate();
var id = this.$element.attr('id');
template = this.createLi(template);
this.$element.after(template);
this.$newElement = this.$element.next('.bootstrap-select');
this.$newElement.addClass(this.direction);
if (id !== undefined) {
this.$newElement.find('> a').attr('id', id);
}
for (var i = 0; i < classList.length; i++) {
if(classList[i] != 'selectpicker') {
this.$newElement.find('> a').addClass(classList[i]);
Expand Down

0 comments on commit 102672e

Please sign in to comment.