How to create multiple Simple Modal dialogs in a page, one for each link?
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
精彩评论