0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00

Merge pull request #6813 from Yohn/patch-12

don't remove title attribute for tooltips for 2.3-wip
This commit is contained in:
Mark Otto 2013-02-06 13:19:50 -08:00
commit c8874ff285
2 changed files with 3 additions and 3 deletions

View File

@ -245,7 +245,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', '')
}
}

View File

@ -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 () {