所以我希望我的用户能够点击简单的模式jquery框中的链接,并关闭当前的模式框并打开一个新的内容。单击链接以简单的模式打开新的简单模式
到目前为止,这没有奏效:
$('#search_dialog_link').click(function() {
$("#search_dialog").modal(
{
position: [150,125],
minWidth: 400
}
);
});
$('#create_course_link').click(function() {
$.modal.close();
$('#add_course_dialog').modal(
{
position: [150,125],
minWidth: 400
}
);
});
凡#search_dialog_link,#create_course_link,#search_dialog和#add_course_dialog建立这样:
<div id="default-content">
This is the page where all of your classes and a list of upcoming assignments will be displayed.
Since you do not have any classes, why not try to add one by clicking the link below.<br><br>
<center><div id="search_dialog_link">+Add a Course</div></center>
</div>
</div>
<div id="search_dialog">
<p>Search for the teacher of your class:</p>
<form id="searchform"><input type="text" width="200px" size="30" value="" id="inputString" />
<div style="font-size: 10; position:relative; bottom:20px; left: 200px;">Dont see it?<div id="create_course_link">Create</div> a new class.</div>
</form>
</div>
<div id="add_course_dialog">
<p>Test</p>
</div>
注意,#search_dialog框打开正确,当用户点击div #create_course_link时,原始模式框关闭。但新的模式框不显示。我究竟做错了什么?
非常感谢!顺便跟上项目的伟大工作。 – retnuh 2011-02-03 00:15:29