0
,我有以下的js代碼關閉引導酥料餅不工作
$('#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();
});
我希望在關閉酥料餅。 close_help
被點擊,但它不起作用。我嘗試了幾種方法,讓父母.popover
到hide
它,但它不起作用。以上是這些途徑之一
這裏是一個jsfiddle模擬
可能的重複http://stackoverflow.com/questions/13413057/how-to-insert-close-button-in-popover-for-bootstrap/13413660#13413660 – davidkonrad