我想在用户单击 fullCalendar 中的某一天时打开引导模式。我查看了 dayClick 事件,但不知道如何调用模型。
dayClick: function(date, jsEvent, view) {
// call the model
},
调用引导模型的正常链接
<a href="#" data-toggle="modal" data-target="#myModal"..................../>
EDIT :
我仅使用 1 个引导模型来满足我的所有需求,并且只需更改内容即可。我这样做的方法是调用 href .. 所以我的链接如下所示:
<a href="<?php echo site_url('model/add') ?>" data-toggle="modal" data-target="#myModal" role="button" class="btn-u btn-block"> Add</a>
如果其他人需要在引导模型中打开 fullCalendar 事件,我找到了方法:
Add :
eventClick: function(event, jsEvent, view) {
$('#modalTitle').html(event.title);
$('#modalBody').html(event.description);
$('#eventUrl').attr('href',event.url);
$('#calendarModal').modal();
},
和模型:
<div id="calendarModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span> <span class="sr-only">close</span></button>
<h4 id="modalTitle" class="modal-title"></h4>
</div>
<div id="modalBody" class="modal-body"> </div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)