I\'m having trouble reloading content of a bootstrap popover with ajax. Here\'s some code: http://pastie.org/3960102
The second ajax request (when I click on \"a.close\"
Why empty()
and then append()
when you can just replace?
t.data('popover').tip().find('.popover-content').html(r);
EDIT:
Also, the first approach is correct and works fine (bootstrap 2.1) when popover is already initialized and you want to change the contents on the fly. You just have to call 'show'
again for the popover to refresh (content and position):
t.attr('data-content', r);
t.popover('show');