<p dir="auto">When I initialize popover via javascript(not adding data attributes) does some facinating things it shoudn't do. It appends content to .content. as it should, but doesn't clear previous content, so there will be this content I need to append there, and previous content</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Whatever.prototype.init(){
        var parent=this;
    this.elem.popover({
        content:parent.content,
        title:'Heading',
        container:'body',

    });
}
Whatever.prototype.content = function() {
    $form=$($.Mustache.render('content',this));
    return $form;
};"><pre class="notranslate"><span class="pl-v">Whatever</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">.</span><span class="pl-en">init</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos"></span><span class="pl-kos">{</span>
        <span class="pl-k">var</span> <span class="pl-s1">parent</span><span class="pl-c1">=</span><span class="pl-smi">this</span><span class="pl-kos">;</span>
    <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">elem</span><span class="pl-kos">.</span><span class="pl-en">popover</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
        <span class="pl-c1">content</span>:<span class="pl-s1">parent</span><span class="pl-kos">.</span><span class="pl-c1">content</span><span class="pl-kos">,</span>
        <span class="pl-c1">title</span>:<span class="pl-s">'Heading'</span><span class="pl-kos">,</span>
        <span class="pl-c1">container</span>:<span class="pl-s">'body'</span><span class="pl-kos">,</span>

    <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-v">Whatever</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">.</span><span class="pl-en">content</span> <span class="pl-c1">=</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-s1">$form</span><span class="pl-c1">=</span><span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s1">$</span><span class="pl-kos">.</span><span class="pl-c1">Mustache</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-s">'content'</span><span class="pl-kos">,</span><span class="pl-smi">this</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-k">return</span> <span class="pl-s1">$form</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">So when I press first time:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/4953629/3589872/55a7d3b8-0c52-11e4-81f2-0c16334baab5.png"><img src="https://cloud.githubusercontent.com/assets/4953629/3589872/55a7d3b8-0c52-11e4-81f2-0c16334baab5.png" alt="screenshot from 2014-07-15 21 58 25" style="max-width: 100%;"></a></p>
<p dir="auto">And say fifth time:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/4953629/3589887/63244d78-0c52-11e4-9d21-f31059d4efe6.png"><img src="https://cloud.githubusercontent.com/assets/4953629/3589887/63244d78-0c52-11e4-9d21-f31059d4efe6.png" alt="screenshot from 2014-07-15 21 58 44" style="max-width: 100%;"></a></p>
<p dir="auto">today I need to do quite idiotic thing:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Whatever.prototype.content = function() {
    $(this).data('bs.popover').$tip.find('.popover-content').empty();
    $form=$($.Mustache.render('content',this));
    return $form;
};"><pre class="notranslate"><span class="pl-v">Whatever</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">.</span><span class="pl-en">content</span> <span class="pl-c1">=</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">data</span><span class="pl-kos">(</span><span class="pl-s">'bs.popover'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">$tip</span><span class="pl-kos">.</span><span class="pl-en">find</span><span class="pl-kos">(</span><span class="pl-s">'.popover-content'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">empty</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-s1">$form</span><span class="pl-c1">=</span><span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-s1">$</span><span class="pl-kos">.</span><span class="pl-c1">Mustache</span><span class="pl-kos">.</span><span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-s">'content'</span><span class="pl-kos">,</span><span class="pl-smi">this</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-k">return</span> <span class="pl-s1">$form</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Hey there,</p>
<p dir="auto">A recent change <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/twbs/bootstrap/commit/5bf13914e49942409c0b21aeaf2ed756c41bd498/hovercard" href="https://github.com/twbs/bootstrap/commit/5bf13914e49942409c0b21aeaf2ed756c41bd498"><tt>5bf1391</tt></a> related to issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="19542402" data-permission-text="Title is private" data-url="https://github.com/twbs/bootstrap/issues/10658" data-hovercard-type="issue" data-hovercard-url="/twbs/bootstrap/issues/10658/hovercard" href="https://github.com/twbs/bootstrap/issues/10658">#10658</a></p>
<p dir="auto">Leads to behavior I'd consider at the very least undesired(and probably overlooked). The net effect is that by using "append", the content returned by the popover method gets re-appended on every single popover toggle.<br>
<a href="http://jsfiddle.net/jQxdv/" rel="nofollow">http://jsfiddle.net/jQxdv/</a></p>
<p dir="auto">This is different than the plugin's behavior historically. Was this a desired change? If yes, why is piling up content considered correct in this case?</p>