Update image source inside UI dialog after dialog has been opened.

Update image source inside UI dialog after dialog has been opened.

Hi all

I have the following function:

    function imageSwap(imgPath){
            jQuery("#bigimage").attr("src", imgPath);
       
    }

which is called by:

    <a href="#" onmouseover="imageSwap('images/upload_pic/resize_<?php echo $image->image;?>')">
    <img src="images/upload_pic/thumbnail_<?php echo $image->image; ?>" border="0">
    </a>

The basic idea is that when you mouseover the thumbnail, it calls the function that replaces the src of image element "bigimage""

    <div class="popup_image">
        <img src="images/upload_pic/resize_<?php echo $bigimage; ?>" id="bigimage">
    </div>


Thus far, it works well inside normal HTML.

The problem is that I have this inside a jQuery UI .dialog.

And then it does not update "bigimage"

Any ideas? 

Thanks guys