所以我希望我的用戶能夠點擊簡單的模式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