Here's the basic hierarchy if using the Bootstrap framework:
modal hierarchy
modal
modal-dialog
modal-content
modal-header
modal-title
modal-body
modal-footer
data-dismiss="modal"
|
Put the mini form, such as a login form, and its submit button in the modal-body.
Bootstrap also comes with useful javascript snippets for modal events. $('#my_modal_id').modal('show');
$('#my_modal_id').modal('hide');
It's best not to reinvent the wheel and use the readily available code in Twitter Bootstrap framework, now just known as Bootstrap. Official documentation here:
http://getbootstrap.com/javascript/#modals
No comments:
Post a Comment