첫째, 문제의 바이올린이 팝 오버 내부 버튼을 잡기하지 .click. "click_me"에 대한 클릭을 듣기 위해 jquery를 가지고 있으며 경고를 던져야합니다. 그러나 그렇지 않습니다. 내가 놓친 게 있니?부트 스트랩 팝 오버는
JS :
jQuery(document).ready(function($) {
$('.demo_button').click(function() {
$(this).popover({
html: true,
trigger: 'manual',
placement: 'right',
content: function() {
var $buttons = $('#popover_template').html();
return $buttons;
}
}).popover('toggle');
});
$('.click_me').click(function() {
alert('it works!');
});
});
HTML :
<button class="btn btn-primary demo_button">Click here</button>
<div id="popover_template">
<button class="btn click_me">Make Alert</button>
</div>
로드시 생성되지 않았다는 사실에 대해서는 생각하지 않았습니다. 고마워, 이건 완벽한 해답이야! –