Created
August 18, 2015 17:43
-
-
Save guyhughes/1e41738f485f6196569a to your computer and use it in GitHub Desktop.
Bootstrap 3 Tooltip Title Override - Don't use "title" attribute - Works with Bootstrap-Select
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
// Bootstrap 3 Tooltip Title Override | |
// Author: Guy Hughes | |
// Date: 2015-08-15 | |
// Licence: GNU GPL v3.0 http://www.gnu.org/licenses/gpl-3.0.txt | |
$.fn.tooltip.Constructor.prototype.getTitle = function () { | |
var title | |
var $e = this.$element | |
var o = this.options | |
//title = $e.attr('data-original-title') || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) | |
title = $e.data('tip') || $e.attr('placeholder') || $e.attr('data-original-title') || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) | |
return title | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment