Skip to content

Commit

Permalink
Fix selected option in optgroups
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyjhol committed Dec 21, 2012
1 parent be1ad92 commit a31e97b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bootstrap-select.js
Expand Up @@ -106,7 +106,7 @@
var _liHtml = '';
var opt_index = null;
var _this = this;
var _selected_index = this.$element.find('option:selected').index() ? this.$element.find('option:selected').index() : 0;
var _selected_index = this.$element[0].selectedIndex ? this.$element[0].selectedIndex : 0;

this.$element.find('option').each(function(){
_li.push($(this).text());
Expand Down

0 comments on commit a31e97b

Please sign in to comment.