Display image in bootbox.js

Is there a way to show images in modal mode using bootstrap and bootbox.js?

I get Data (which has an image url) from ajax and want to show modally using bootstrap and bootbox.js

+4
source share
1 answer

The great thing with bootbox is that the line of the message you pass to it does not have to be plain text. It can be any html code. Then you can use this function to display the image from the URL in modal mode:

function showImage(url) {
  bootbox.alert("Do you like my image?<br/><img src='" + url + "'>", function() {
    console.log("It was awesome!");
  });
};
+8
source

All Articles