【发布时间】:2014-03-12 07:02:51
【问题描述】:
情况是,我想在bootstrap popover v2.3.1中打开一个图像 并且图像是Base64格式。 单击按钮 [id='imagePopoverButton'] 时,弹出窗口正在打开,但未显示 base 64 图像。
我正在分享下面的代码 sn-p,如果有人可以帮助我解决同样的问题。
<!-- js func, which load Base 64 img format via Ajax -->
function showImagePopover() {
$.ajax({
url : getContextPath()
+ "/app/Application/showImagePopover",
type : 'POST',
async : false,
success : function(jqXHR) {
// In this scope, i have fetched the ajax image, but i am not been able
//to show that up in popover
}
});
}
/***************************************************************/
<!-- Popover function js, html:true -->
$("#imagePopoverButton").popover({
content : showImagePopover(),
html : true,
trigger : 'click',
placement : 'right',
});
/***************************************************************/
<!-- via Clicking of the button, ajax call is suppose to load base64 image in popover -->
<button type="button" class="btn btn-mini btn-primary" id="imagePopoverButton" rel="popover">imagePopover</button>
【问题讨论】:
标签: javascript jquery twitter-bootstrap popover