Reputation: 321
Onmouse hover ,popover is showing only title not the image
Code :
<script type="text/javascript">
$(document).ready(function(){
var img ='<img src="/assets/Excel_1.png">';
$("#blob").popover({ title: 'Format for Excel sheet', content: img , trigger:'hover' });
});
</script>
In Body:
<i href="#" id="blob" class="icon-info-sign" rel="popover" style="margin-top: 300px"> </i>
But not showing image.....
Thanks
Upvotes: 1
Views: 1175
Reputation: 321
Got the solution of this simple problem...
$("#blob_1").popover({ title: 'Format for Excel sheet', content: img , trigger:'hover',html: true });
Just this change made the need possible
Thanks..
Upvotes: 3
Reputation: 802
I think you haven't closed the image tag. May be this is the problem:
var img ='<img src="/assets/Excel_1.png">';
It should be:
var img ='<img src="/assets/Excel_1.png"></img>';
Upvotes: 0
Reputation: 74738
Try this one: http://jsbin.com/iducul/1/edit
Html is:
<a href="#" id="example" class="btn btn-success" rel="popover">hover for popover</a>
jQuery is:
$(function (){
var img = '<img src="https://si0.twimg.com/a/1339639284/images/three_circles/twitter-bird-white-on-blue.png" />';
$("#example").popover({title: 'Twitter Bootstrap Popover', content:img});
});
Upvotes: 0