Popover Handling

This example will trigger a popover when a link is clicked and dismiss automatically in 3 seconds. 

 
function toggle_popover(selector){
	var $item = $(selector);

	if($('div.popover').size() > 0){
		close_popover(selector);
	}else{
		$item.popover({
			content: 'Under construction', 
			container: 'body', 
			placement: 'bottom', 
			trigger: 'manual'
		}).popover('show');

		$('div.popover').css({'z-index': 9999}); //Optional

		setTimeout("close_popover('" + selector + "')", 3000);
	}
}

function close_popover(selector){
	$(selector).popover('hide').popover('destroy');
}