image disapper after opening it in a jquery dialog
i have a code that opens the image in a dialog when clicked and it works fine but the problem is t开发者_运维百科hat the image clicked disappear from its position after it opens in the dialog, here is the code i am using:
$(function () {
$("img").click(function (s) {
$(this).dialog({
height: 750,
width: 650,
modal: true,
zIndex:900
});
});
});
what is the problem , thanks
You could open a clone of the image, so the original doesn't disappear:
$(function () {
$("img").click(function (s) {
$(this).clone().dialog({
height: 750,
width: 650,
modal: true,
zIndex:900
});
});
});
Hope this helps. Cheers
精彩评论