Last active
September 8, 2020 10:20
-
-
Save m8rge/61929a6c356349bf080c to your computer and use it in GitHub Desktop.
twitter bootstrap tooltip over select2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Declate title attribute on target select element. | |
* Initialize tooltip: | |
*/ | |
jQuery("div.select2-container").tooltip({ | |
title: function() { | |
return $(this).next().attr("title"); | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using tooltip semantic on the select element:
$("span.select2.select2-container").tooltip({
title: function() {
var title = $(this).prev().attr("data-original-title");
return title;
}
});