<div class="lessonDetails">
<a href="#popUpLink" class="popUpLink">Lesson Details</a>
<div class="popUpDialog" title="Lesson Details">
<p>This is lesson dialog </p>
</div>
</div>
<div class="courseDetails">
<a href="#popUpLink" class="popUpLink">Course Timetable and Resources</a>
<div class="popUpDialog" title="Course Timetable and Resources">
<p>Course Timetable</p>
<p>Resources</p>
</div>
</div>
jQuery(function($) {
$('.popUpLink').each(function() {
$.data(this, 'dialog', $(this).next('.popUpDialog').dialog({
autoOpen: false,
modal: true,
title: 'Info',
draggable: true
}));
}).click(function() {
$.data(this, 'dialog').dialog('open');
return false;
});
});
如何设置对话框的标题,使第一个对话框(课程对话框)的标题为“课程详细信息”,第二个对话框(课程对话框)将为“课程时间表和资源“?
请记住,后端会动态决定对话框的数量。