开发者

Display images with jQuery UI Dialog widget like in FancyBox

开发者 https://www.devze.com 2023-01-31 06:17 出处:网络
I just started using jQuery with themes and CSS framework. I am doing some dialogs for my AJAX 开发者_如何学Gocalls and all works well but I\'ve a problem with showing images.

I just started using jQuery with themes and CSS framework. I am doing some dialogs for my AJAX 开发者_如何学Gocalls and all works well but I've a problem with showing images.

I used in the past FancyBox to simply preview images in the same pages, applying a class to the anchor and then doing something like: $("a.example.").fancybox();.

There is someway to do it this with jQuery UI Dialog?

Thanks you!


Html

<a class="preview" href="#" />
<div class="myImage">
   <img src="http://myimage.png" alt="myimage" />
</div>

CSS

div.myImage
{
    display: none;
}

jQuery

$("a.preview").click(function() {
    $('div.myImage').dialog();
});
0

精彩评论

暂无评论...
验证码 换一张
取 消