For anyone who is still a little confused:
Here is how it works to toggle the popover after you have gotten it to show, select the same button you used to trigger it and call .popover('toggle') on it.
In this case, for closing the popover the code would be:
$('#example').popover('toggle');