我得到一个:
Uncaught TypeError: Object [object Object] has no method 'modalmanager'
在我的 script.js 文件中,我有:
$('#addShoplistModal').modal('toggle');
我的jsp页面代码:
<div class="modal hide fade" id='addShoplistModal'>
<div class='modal-header'>
<a class='close' data-dismiss='modal'>×</a>
<h3>Add Shopitem</h3>
</div>
<div class='modal-body'>
<form id="addShopitemForm">
<div id="name-error"></div>
<input type="text" id="name" placeholder="Name" />
<div id="quantity-error"></div>
<input type="text" id="quantity" placeholder="Quantity" />
</form>
</div>
<div class='modal-footer'>
<a class="btn" data-dismiss="modal">Cancel</a>
<a shoplistId="" id="add-shoplist" class="btn btn-primary">Add</a>
</div>
</div>
<script src="<spring:url value="/web/js/jquery-2.0.0.js" />"></script>
<script src="<spring:url value="/web/js/jquery.validate.js" />"></script>
<script src="<spring:url value="/web/js/bootstrap.js" />"></script>
<script src="<spring:url value="/web/js/bootstrap-modal.js" />"></script>
<script src="<spring:url value="/web/js/script.js" />"></script>
错误在 bootstrap-modal.js 处
manager = manager.appendModal ?
manager : $(manager).modalmanager().data('modalmanager');
请告诉我,如何解决这个问题。谢谢。