Is there any way to show images in modal using bootstrap and bootbox.js?
I am getting Data (which has an image url) from ajax and want to show in a modal using bootstrap and bootbox.js
The cool thing with bootbox is that the message string you pass to it doesn't have to be plain text. It can be any html code. You can then have this function to show an image from an url in a modal:
function showImage(url) {
bootbox.alert("Do you like my image?<br/><img src='" + url + "'>", function() {
console.log("It was awesome!");
});
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With