在Windows调整大小时禁用Jquery模式

时间:2017-05-04 09:08:58

标签: javascript jquery html css bootstrap-modal

我有一个网页,在点击按钮时显示jquery模式。

$("#add").click(function () {
    $("#dialog").modal();
});

HTML:

<div id="dialog" class="modal fade in" tabindex="-1" role="dialog" aria-labelledby="model" aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title">Add</h4>
            </div>
            <div class="modal-body">
                <div class="form-group required">
                    <label class="form-control-label">Name</label>
                    <input type="text" class="form-control required" required id="name" pattern="[A-Za-z]*" placeholder="John"/>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
                <button type="button" class="btn btn-primary" id="save">OK</button>
            </div>
        </div>
    </div>
</div>

当我调整屏幕大小时,即更改屏幕宽度超出一定限度时,模态将被禁用。它是jquery模态的默认行为以及如何克服它。?

0 个答案:

没有答案