我尝试使用这个
html
<div class="company-logo">
<a class="popup" href="#" data-toggle="popover" data-content="Download den Mazda Case (.pdf)">
<img src="img/logo/mazda.png" alt="logo">
</a>
</div>
JS
$(function () {
var pop_description = $(this).attr("data-content");
var pop_link = $(this).attr("href");
var pop_content = '<a href="' + pop_link + '">' + pop_description + '</a>';
$('.popup').popover({
placement: 'top',
html: true,
content: pop_description
});
});
但这是错误的,我有未定义的。我想在弹出框内容中添加链接