如何使jquery对话框与themeroller主题一起使用?

时间:2021-08-22 19:44:45

I am trying out the dialog from jquery UI. All the online demos use flora.css. I can't get the dialog to display correctly with the css file generated by the themeroller application. Am I missing something? Should these things work out of the box?

我正在尝试从jquery UI的对话框。所有在线演示都使用flora.css。我无法使用themeroller应用程序生成的css文件正确显示对话框。我错过了什么吗?这些东西应该开箱即用吗?

Update: Thanks Brock. When I cleaned up my code to make a sample, I realized that the HTML in demo.html (that comes with the themeroller.zip) is a little too verbose. All I needed to do was give the dialog div the attribute class="ui-dialog" like this:

更新:谢谢布洛克。当我清理我的代码来制作样本时,我意识到demo.html中的HTML(与themeroller.zip一起提供)有点过于冗长。我需要做的就是给对话框div这样的属性class =“ui-dialog”:

<div id="SERVICE03_DLG" class="ui-dialog">please enter something<br><br>
<label for="something">somthing:</label>&nbsp;<input name="something" id="something" type="text" maxlength="20" size="24">
</div>

I'll accept your answer. Thanks for your time.

我会接受你的回答。谢谢你的时间。

1 个解决方案

#1


1  

I think it is because you have the classes different.

我认为这是因为你有不同的课程。

<div id="SERVICE03_DLG" class="flora"> (flora)
<div id="SERVICE03_DLG" class="ui-dialog"> (custom)

Even with the flora theme, you would still use the ui-dialog class to define it as a dialog.

即使使用flora主题,您仍然可以使用ui-dialog类将其定义为对话框。

I've done modals before and I've never even defined a class in the tag. jQueryUI should take care of that for you.

我以前做过模态,我甚至从未在标签中定义过类。 jQueryUI应该为你照顾。

Try getting rid of the class attribute or using the ui-dialog class.

尝试删除class属性或使用ui-dialog类。

#1


1  

I think it is because you have the classes different.

我认为这是因为你有不同的课程。

<div id="SERVICE03_DLG" class="flora"> (flora)
<div id="SERVICE03_DLG" class="ui-dialog"> (custom)

Even with the flora theme, you would still use the ui-dialog class to define it as a dialog.

即使使用flora主题,您仍然可以使用ui-dialog类将其定义为对话框。

I've done modals before and I've never even defined a class in the tag. jQueryUI should take care of that for you.

我以前做过模态,我甚至从未在标签中定义过类。 jQueryUI应该为你照顾。

Try getting rid of the class attribute or using the ui-dialog class.

尝试删除class属性或使用ui-dialog类。