javascript - How to show Bootstrap 3 popover when page is loaded and then hide - Stack Overflow

I have a question regarding to Bootstrap 3. I want to show popover, when the page is loaded -> when

I have a question regarding to Bootstrap 3. I want to show popover, when the page is loaded -> when client opens certain html page, popover shows up and then after some time that popover fades out. What is the best way to do this? I am trying this where .poper is just a div's class around image

$(window).load(function(){
 $(".poper").popover('show');
    $(".poper").hide(600);
});

Thank You for Your replies.

I have a question regarding to Bootstrap 3. I want to show popover, when the page is loaded -> when client opens certain html page, popover shows up and then after some time that popover fades out. What is the best way to do this? I am trying this where .poper is just a div's class around image

$(window).load(function(){
 $(".poper").popover('show');
    $(".poper").hide(600);
});

Thank You for Your replies.

Share Improve this question asked Sep 21, 2013 at 13:42 user859670user859670 311 silver badge2 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

If I get you right, you want to show the popover if the page if fully loaded, so the page is ready.

If so, a possible solution could be to set a timeout in the script, which calls the popover to close. This could look like this:

$().ready(function(){
    $('.poper').popover('show');
    window.setTimeout(function(){
        $('.poper').popover('hide');
    }, 600); //600 are the ms until the timeout is called
});

Explanation: The script show until the page is fully loaded the popover .poper and starts a timeout which will it closes it after 600ms.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745109031a4611734.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信