I’m having a newbie problem when trying to display an image in a modal popup with jQuery.
I’m using the following code:
function showBlogImage(image, title)
{
var img_url = '/images/public/admins/' + image;
$('#blog-image-modal').html(img_url);
if(!$("#blog-image-modal").dialog( "isOpen" )){
$('#blog-image-modal').dialog("open");
}
return false;
}
The code sort of works in as far as the modal does actually pop up, only it does display the image’s URL instead of the image itself …
Thanks in advance for your help
You need to tell the browser it’s an image, otherwise it’ll just think it’s a piece of text.