开发者

Jquery multiple modal dialogs by classname?

How can I create multiple modal dialogs by classname (basically the same dialogs but have a different code black attached).

One I launch a modal dialog I cannot reference the dialog anymore because jQuery will move it to the bottom of the document so something like..

$(this).fin开发者_StackOverflowd('.dialog').dialog('open'); 

Would not work anymore.


If I understand this question correctly, you have multiple dialogs that have the same class name and you want to be able to show them all at different times?

If this is the case then you can simply add a second class name to the class attribute which uniquely identifies the dialogs but maintains the first class giving you its look and feel.

class='dialog OpenFileDialog' and then maybe class='dialog SavePictureDialog''

So then in code you reference them by the second class name $(this).find('.OpenFileDialog').dialog('open');

Does this help?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜