From f266595092cd43aead1f6617933554110aeb46ac Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 6 Aug 2013 11:18:12 -0700 Subject: Fixes #9150: Hide popover titles in IE8 Properly hides popover titles in IE8 because apparently it doesn't accept the `:empty` selector. /cc @fat @cvrebert --- js/popover.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'js') diff --git a/js/popover.js b/js/popover.js index feee3308d..4d4979247 100644 --- a/js/popover.js +++ b/js/popover.js @@ -58,7 +58,13 @@ $tip.removeClass('fade top bottom left right in') - $tip.find('.popover-title:empty').hide() + // Hide empty titles + // + // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do + // this manually by checking the contents. + if ($tip.find('.popover-title').html() === '') { + $tip.find('.popover-title').hide(); + } } Popover.prototype.hasContent = function () { -- cgit v1.2.3 From f816a18f7980d22de07f6e341551af68c3ba7958 Mon Sep 17 00:00:00 2001 From: Braden Whitten Date: Tue, 6 Aug 2013 17:02:57 -0400 Subject: Fix spacing after '=' Just added a space after a function definition to tidy up the code. --- js/popover.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/popover.js b/js/popover.js index 4d4979247..24b85715f 100644 --- a/js/popover.js +++ b/js/popover.js @@ -81,7 +81,7 @@ o.content) } - Popover.prototype.arrow =function () { + Popover.prototype.arrow = function () { return this.$arrow = this.$arrow || this.tip().find('.arrow') } -- cgit v1.2.3