diff --git a/docs/_includes/js/popovers.html b/docs/_includes/js/popovers.html index ab33baccbd..3182d8c4de 100644 --- a/docs/_includes/js/popovers.html +++ b/docs/_includes/js/popovers.html @@ -40,7 +40,7 @@ $(function () {

Four options are available: top, right, bottom, and left aligned.

-
+

Popover top

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

@@ -48,7 +48,7 @@ $(function () {
-
+

Popover right

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

@@ -56,7 +56,7 @@ $(function () {
-
+

Popover bottom

@@ -65,7 +65,7 @@ $(function () {
-
+

Popover left

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

@@ -207,12 +207,12 @@ sagittis lacus vel augue laoreet rutrum faucibus."> template string - '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>' + '<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'

Base HTML to use when creating the popover.

The popover's title will be injected into the .popover-title.

The popover's content will be injected into the .popover-content.

-

.arrow will become the popover's arrow.

+

.popover-arrow will become the popover's arrow.

The outermost wrapper element should have the .popover class.

diff --git a/docs/javascript/popovers.md b/docs/javascript/popovers.md index 0844621ba3..f84d52bbeb 100644 --- a/docs/javascript/popovers.md +++ b/docs/javascript/popovers.md @@ -44,7 +44,7 @@ Four options are available: top, right, bottom, and left aligned.
-
+

Popover top

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

@@ -52,7 +52,7 @@ Four options are available: top, right, bottom, and left aligned.
-
+

Popover right

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

@@ -60,7 +60,7 @@ Four options are available: top, right, bottom, and left aligned.
-
+

Popover bottom

@@ -69,7 +69,7 @@ Four options are available: top, right, bottom, and left aligned.
-
+

Popover left

Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.

@@ -222,12 +222,12 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap template string - '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>' + '<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'

Base HTML to use when creating the popover.

The popover's title will be injected into the .popover-title.

The popover's content will be injected into the .popover-content.

-

.arrow will become the popover's arrow.

+

.popover-arrow will become the popover's arrow.

The outermost wrapper element should have the .popover class.

diff --git a/js/popover.js b/js/popover.js index db272bdee4..8aed51d2b1 100644 --- a/js/popover.js +++ b/js/popover.js @@ -25,7 +25,7 @@ placement: 'right', trigger: 'click', content: '', - template: '' + template: '' }) @@ -72,7 +72,7 @@ } Popover.prototype.arrow = function () { - return (this.$arrow = this.$arrow || this.tip().find('.arrow')) + return (this.$arrow = this.$arrow || this.tip().find('.popover-arrow')) } Popover.prototype.tip = function () { diff --git a/js/tests/unit/popover.js b/js/tests/unit/popover.js index 466ebace26..8f59d3483a 100644 --- a/js/tests/unit/popover.js +++ b/js/tests/unit/popover.js @@ -141,7 +141,7 @@ $(function () { .bootstrapPopover({ title: 'Test', content: 'Test', - template: '

' + template: '

' }) $popover.bootstrapPopover('show') diff --git a/scss/_popover.scss b/scss/_popover.scss index 63928a4fce..11b6acaaac 100644 --- a/scss/_popover.scss +++ b/scss/_popover.scss @@ -47,9 +47,9 @@ // Arrows // -// .arrow is outer, .arrow:after is inner +// .popover-arrow is outer, .popover-arrow:after is inner -.popover > .arrow { +.popover > .popover-arrow { &, &:after { position: absolute; @@ -60,16 +60,16 @@ border-style: solid; } } -.popover > .arrow { +.popover > .popover-arrow { border-width: $popover-arrow-outer-width; } -.popover > .arrow:after { +.popover > .popover-arrow:after { content: ""; border-width: $popover-arrow-width; } .popover { - &.top > .arrow { + &.top > .popover-arrow { bottom: -$popover-arrow-outer-width; left: 50%; margin-left: -$popover-arrow-outer-width; @@ -83,7 +83,7 @@ border-bottom-width: 0; } } - &.right > .arrow { + &.right > .popover-arrow { top: 50%; left: -$popover-arrow-outer-width; margin-top: -$popover-arrow-outer-width; @@ -97,7 +97,7 @@ border-left-width: 0; } } - &.bottom > .arrow { + &.bottom > .popover-arrow { top: -$popover-arrow-outer-width; left: 50%; margin-left: -$popover-arrow-outer-width; @@ -112,7 +112,7 @@ } } - &.left > .arrow { + &.left > .popover-arrow { top: 50%; right: -$popover-arrow-outer-width; margin-top: -$popover-arrow-outer-width;