Skip to content
This repository was archived by the owner on Nov 3, 2020. It is now read-only.

Commit 341303d

Browse files
committed
use .attr to get select title to ensure consistency across browsers (#48)
1 parent 63a924a commit 341303d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

js/bootstrap-select.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,7 +1363,8 @@
13631363
}
13641364

13651365
if (this.options.title == undefined) {
1366-
this.options.title = this.$element[0].title;
1366+
// use .attr to ensure undefined is returned if title attribute is not set
1367+
this.options.title = this.$element.attr('title');
13671368
}
13681369

13691370
if (this.options.selectedTextFormat == 'static') {

0 commit comments

Comments
 (0)