Bootstrap popover content cannot changed dynamically

后端 未结 14 2259
旧时难觅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:12

    After the popover has been correctly initialized, you can directly use jquery to replace the class="popover-content" element:

    $(".popover-content").html('a nice new content')
    

提交回复
热议问题