div가 있습니다. 그 공중 선회에서 나는 popover를 보여준다. popover에서 두 개의 버튼을 만들었습니다. 문제는 내가 마우스를 가져 가면 버튼 팝업이 사라집니다. 나는 div를 동적으로 만든다.사용자가 부트 스트랩 팝업 버튼을 클릭하여 버튼을 클릭하는 방법
팝 오버를 들어$('.more').click(function() {
opinionBox += '<div onmouseenter="test($(this))" class="opinion">hello</div>';
$(this).append(opinionBox);
})
: 당신은이
function test(box) {
box.popover({title: 'Current Opinion',
trigger: 'hover',
delay: { hide: 5000 }, // or greater time as you think
html: 'true',
content: '<div><button>Press Me</button></div>',
placement: 'left'
}).popover('show');
}
.popover ('show')는 필요하지 않습니다. 표시/숨기기는 정의 된 'trigeer'속성에 따라 작동합니다. – mujaffars