Skip to content

Instantly share code, notes, and snippets.

@manute
Last active December 16, 2015 12:19
Show Gist options
  • Save manute/5434010 to your computer and use it in GitHub Desktop.
Save manute/5434010 to your computer and use it in GitHub Desktop.
Change content dinamically of Popover Twitter Bootstrap
$(function () {
var $popoverInbox = $('#example').popover({
title: 'Test',
placement: 'bottom',
template: '<div class="popover-all"><div class="popover-arrow"></div><div class="popover-inner"><h3 class="popover-title">Example</h3><div class="popover-content"></div></div></div>'
});
var count=0;
$(document).on({
click: function() {
count += 1;
var dataPopover = $popoverInbox.data('popover');
dataPopover.tip().find('.popover-content').html('<p>Clik:'+count+'</p>');
}
}, '.popover-all');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment