Skip to content

Commit

Permalink
Fix popover when using append.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanneculai committed Mar 24, 2014
1 parent d74aee4 commit 41628c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
var content = this.getContent()

$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
$tip.find('.popover-content')[ // we use append for html objects to maintain js events
$tip.find('.popover-content').empty()[ // we use append for html objects to maintain js events
this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
](content)

Expand Down

1 comment on commit 41628c9

@drewlustro
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jesus christ... I spent 3 hours spread out over the past week banging my head against a wall about why I was getting duplicate content in my popovers with Boostrap 3.1.0

Now I understand the Bootstrap JS much more, but my god that cheeky .empty() was all I needed. Should've checked for 3.1.1 a bit sooner than letting myself think I'm insane.

Please sign in to comment.