Saturday, May 11, 2024
35
rated 0 times [  38] [ 3]  / answers: 1 / hits: 126030  / 12 Years ago, sun, june 17, 2012, 12:00:00

The canonical example for Twitter Bootstrap's popover feature is sort of a tooltip on steroids with a title.



HTML:



<a href=# id=blob class=btn large primary rel=popover data-content=And here's some amazing content. It's very engaging. right? data-original-title=A title>hover for popover</a>


JS:



<script>
$(#blob).popover({offset: 10});
</script>


I'd like to use popover to display an image. Is this possible?


More From » twitter-bootstrap

 Answers
234

Very simple :)



<a href=# id=blob class=btn large primary rel=popover>hover for popover</a>

var img = '<img src=https://si0.twimg.com/a/1339639284/images/three_circles/twitter-bird-white-on-blue.png />';

$(#blob).popover({ title: 'Look! A bird!', content: img, html:true });


http://jsfiddle.net/weuWk/


[#84850] Friday, June 15, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rociom

Total Points: 287
Total Questions: 88
Total Answers: 101

Location: Oman
Member since Wed, Nov 17, 2021
3 Years ago
;