如何在popstrap 3中将表单放在popover中?
<a href="#" class="btn btn-lg btn-danger" data-toggle="popover" title="" data-content="And here's some amazing content. It's very engaging. right?" data-original-title="A Title">Click It !</a>
它产生的效果如下:
我想在其体内放置一个表格。我们怎么做呢?
答案 0 :(得分:20)
$('#popover').popover({
html : true,
title: function() {
return $("#popover-head").html();
},
content: function() {
return $("#popover-content").html();
}
});
Popover HTML Markup:
<a href="#" id="popover">the popover link</a>
<div id="popover-head" class="hide">some title</div>
<div id="popover-content" class="hide">
<form>
<!-- my form -->
</form>
</div>
答案 1 :(得分:0)
我在popover上添加内容如下:
$('#your-poped').popover({
content: '<div id="preview"></div>',
html: true,
trigger: 'manual',
delay: {'show':1000, 'hide':250},
});
$('#preview').html(yourdata);