The Modal Plugin Classes
| Class | Description |
|---|---|
| .modal | Creates a modal |
| .modal-content | Styles the modal properly with border, background-color, etc. Use this class to add the modal's header, body, and footer. |
| .modal-header | Defines the style for the header of the modal |
| .modal-body | Defines the style for the body of the modal |
| .modal-footer | Defines the style for the footer in the modal. Note: This area is right-aligned by default. To change this, overwrite CSS with text-align:left|center |
| .modal-sm | Specifies a small modal |
| .modal-lg | Specifies a large modal |
| .fade | Adds an animation/transition effect which fades the modal in and out |
2. 綁定事件
開啟事件的處理
$('.form_modal').on('show.bs.modal', function(e) {
// DO Something $('#myInput').trigger('focus')
});
關閉事件的處理
$('.form_modal').on('hide.bs.modal', function(e) {
});
沒有留言:
張貼留言