最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How can I use 'manual' as a trigger option for popovers in the Twitter Bootstrap framework? - Stack

programmeradmin4浏览0评论

In the Twitter Bootstrap framework, both the Twipsy and Popover plugins list 'manual' as an option for triggering the tooltip. How would one use the manual option (i.e. what's the practical effect of that - how does the tooltip get activated)?


Answer
This is what I ended up using (making use of 'toggle'):

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

In the Twitter Bootstrap framework, both the Twipsy and Popover plugins list 'manual' as an option for triggering the tooltip. How would one use the manual option (i.e. what's the practical effect of that - how does the tooltip get activated)?


Answer
This is what I ended up using (making use of 'toggle'):

jQuery(document).ready(function($) {
$('.popup-marker').popover({
        html: true,
        trigger: 'manual',
    }).click(function() {
        $(this).popover('toggle');
    });
});
Share Improve this question edited Jun 23, 2013 at 19:45 Cheeso 193k105 gold badges484 silver badges734 bronze badges asked Jan 17, 2012 at 16:46 Travis NorthcuttTravis Northcutt 25k9 gold badges43 silver badges51 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 10

You could activate it with:

$('#element').twipsy('show')

And then hide with:

$('#element').twipsy('hide')

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论