Dynamically add a class to Bootstrap's 'popover' container

后端 未结 22 2562
名媛妹妹
名媛妹妹 2020-11-29 18:27

I\'ve thoroughly searched through both StackOverflow and Google, but come up empty. So apologies in advance if this has been asked & resolved already.

NB

22条回答
  •  佛祖请我去吃肉
    2020-11-29 18:56

    This works for me. It is inspired by the bootstrap's documentation from here, the Events section.

    $("a[rel=popover]").popover().on("show.bs.popover", function(){
        $(".popover").addClass("your-custom-class");
    });
    

提交回复
热议问题