Created
March 3, 2020 07:16
-
-
Save mileskrell/15a67d34c602a31da80190c0b84bec96 to your computer and use it in GitHub Desktop.
Example of showing an image in a Bootstrap popover
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- You'll need to add all the Bootstrap stuff for this to work --> | |
<p>Click <a href="#" id="popover-link" data-toggle="popover">here</a> to see an image in a popover.</p> | |
<script> | |
window.onload = function () { | |
$("#popover-link").popover({ | |
content: '<img src="https://via.placeholder.com/200x200" width="200" height="200" />', | |
trigger: "focus", | |
html: true | |
}) | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment