可重用的JQuery Modal对话框? [英] Reusable JQuery Modal Dialog Box?
问题描述
过去6个月我一直在使用jquery.
I've been using jquery on and off for the last 6 months.
我有一个要替换20种不同的javascript alert(");的表单;带有jQuery Modal对话框的语句.
I have a form where I want to replace 20 different javascript alert(""); statements with jQuery Modal Dialog boxes.
我不想为每个不同的消息创建一个单独的对话框div部分.
I don't want to create a separate dialog div section for each different message.
使用基本的jquery-ui是否可以创建一个可重用的模式对话框,在其中可以传递消息标题和消息文本?
Is there a way with base jquery-ui to create a reusable modal dialog box where I can pass in the message title and message text?
让我知道您有什么想法吗?
Let me know if you have any ideas?
德里克
推荐答案
对于对话框的jQuery,您可以找到很多插件.
There are a lot of plugins that you can find for jQuery for dialog boxs.
过去,我曾经使用过 facebox插件.
基本用法可以很简单:
jQuery.facebox('something cool')
这篇关于可重用的JQuery Modal对话框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!