Skip to content

Instantly share code, notes, and snippets.

@guyhughes
Created August 18, 2015 17:43
Show Gist options
  • Save guyhughes/1e41738f485f6196569a to your computer and use it in GitHub Desktop.
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
// 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