有人知道如何通过 javascript/jquery 创建数据并将其添加到 Bootstrap 5 弹出窗口吗?
使用 bootstrap 3 我能够做到这一点:
$('#element').popover({ placement : 'left', trigger : 'focus', html: true });
let content_template = `<h1>Hello World!</h1>`;
$('#element').data('bs.popover').options.content = content_template;
Run Code Online (Sandbox Code Playgroud)
但我不知道如何使用 bootstrap 5 做同样的事情。文档没有提到任何关于这一点的内容。有谁知道 BS5 中的 popover 是如何管理的?