开发者

How to create multiple Simple Modal dialogs in a page, one for each link?

开发者 https://www.devze.com 2023-03-03 01:50 出处:网络
I am trying to create a gallery开发者_JAVA技巧 of videos with thumbnails. I have the first thumbnail working with SimpleModal at the correct height, but all of the other thumbnails keep opening the fi

I am trying to create a gallery开发者_JAVA技巧 of videos with thumbnails. I have the first thumbnail working with SimpleModal at the correct height, but all of the other thumbnails keep opening the first modal box. How can I create separate modal boxes so different content shows up when different links are clicked?

Please help, I can feel this is 10x simpler than what I am trying.


You can do that:

$('img').click(function()
    {
        // create the div's popup
        $.('<div>')
            .html("whatever html included in the popup")
            .dialog({ 
                height: 200,
                width: 520,
                modal: false
            });
    });


The following SO question/answer should provide you with the solution you are looking for, and it is SimpleModal specific:

Multiple calls with Simple Modal OSX Style Dialog

0

精彩评论

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