Bootstrap popover content cannot changed dynamically

后端 未结 14 2301
旧时难觅i
旧时难觅i 2020-11-29 22:40

I use the code as follows:

$(\".reply\").popover({
  content: \"Loading...\",
  placement: \"bottom\"
});

$(\".reply\").popover(\"toggle\");
14条回答
  •  孤街浪徒
    2020-11-29 23:24

    This answer from 2012 does not work with Bootstrap 3 popovers. I extracted a working solution from this question:

    $("#popover").attr('data-content', 'new content');

提交回复
热议问题