First you call the popover plugin with the selector
Demo
$('[data-toggle="popover"]').popover(options);You must be set the "trigger" option to "manual" for showing one popover at a time.
$('[data-toggle="popover"]').popover({'trigger': 'manual'});Then you should catch the click event. Show the current popover and hide others
$('[data-toggle="popover"]').on('click', function (e)The final code & demo is here
{
$(this).popover('show');
$('[data-toggle="popover"]').not(this).popover('hide');
});
Demo
No comments:
Post a Comment