如何在Twitter Bootstrap框架中使用'manual'作为弹出窗口的触发器选项?

Tra*_*utt 15 javascript twitter-bootstrap

在Twitter Bootstrap框架中,Twipsy和Popover插件列出了"手动"作为触发工具提示的选项.如何使用手动选项(即实际效果是什么 - 工具提示如何激活)?


回答
这是我最终使用的(利用'切换'):

jQuery(document).ready(function($) {
$('.popup-marker').popover({
        html: true,
        trigger: 'manual',
    }).click(function() {
        $(this).popover('toggle');
    });
});
Run Code Online (Sandbox Code Playgroud)

bjo*_*rnd 10

你可以用以下方法激活它:

$('#element').twipsy('show')
Run Code Online (Sandbox Code Playgroud)

然后隐藏:

$('#element').twipsy('hide')
Run Code Online (Sandbox Code Playgroud)