Commit ee91afba authored by fat-kun's avatar fat-kun

Merge pull request #6481 from pseidemann/patch-1

don't remove title attribute for tooltips
parents 558bc524 c4eea3ab
......@@ -185,7 +185,7 @@
, fixTitle: function () {
var $e = this.$element
if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
$e.attr('data-original-title', $e.attr('title') || '').removeAttr('title')
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
}
}
......
......@@ -22,9 +22,9 @@ $(function () {
ok(!!$.fn.tooltip.defaults, 'defaults is defined')
})
test("should remove title attribute", function () {
test("should empty title attribute", function () {
var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>').tooltip()
ok(!tooltip.attr('title'), 'title tag was removed')
ok(tooltip.attr('title') === '', 'title attribute was emptied')
})
test("should add data attribute for referencing original title", function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment