I'm trying to get a Bootstrap (most recent version) modal to use a third button in the footer.
<div class="modal-footer">
<button type="button" id="btn-remove" class="btn btn-danger" >Del</button>
<button type="button" id="close-btn" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" id="save-btn" class="btn btn-primary">Save changes</button>
</div>
However the javascript environment keeps complaining that I am attaching a click event to an element which doesn't implement the HTMLElement interface. WTH? I use exactly the same techinque to wire up the other two buttons, binding with jQuery to the buttono element by id:
$('#close-btn').on('click', self.clear_modal_values);
$('#save-btn').on('click', self.save_modal_values);
$('#btn-remove').on('click', self.remove_exceptions);
Is there something inherently different about the btn-danger
treatment ? Or something else obvious I have screwed up?
事实证明错误在其他地方,而这仅仅是错误发生的地方。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.