Reputation: 32190
I have the following js code
$('#myelemt').popover({placement: 'right', title: 'What is this',
content: 'content content content content content content content content content content content ', trigger: 'manual', html: 'true', container: '.wrap'});
$('#myelemt').click(function(e) {
$('#myelemt').popover('show');
$('.popover-title').append('<button type="button" class="close close_help">×</button>');
e.stopPropagation();
});
$('.close_help').click(function(e) {
$(this).parents('#myelemt').popover('hide');
e.preventDefault();
});
I want to close the popover when the .close_help
is clicked, but it doesn't work. I tried several ways of getting to the parent .popover
to hide
it but it doesn't work. The above is one of those ways
here is a jsfiddle simulation
Upvotes: 0
Views: 591