JavaUser
JavaUser

Reputation: 26364

HTML frame - Prevent bootstrap popup to disappear when user click body

I am using bootstrap modal popup to show a a message. When I am using the below statement inside a html frame then modal dialog is getting disappear when user click anywhere in the body . My requirement is to prevent this popup to disappear.

$('#testModel').modal({backdrop: 'static', keyboard: false});

<div class="modal fade" id="testModel" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-body err-cnct">
                <h2><i class="demo-icon fa-lg icon-cancel"></i></h2>

                <p> <h4 class="modal-title">Connection Error!</h4>
                Connection to the Hub has been lost. <br/>Please check power and Ethernet connections. </p>
            </div>
        </div>
    </div>
</div>

Thanks.

Upvotes: 0

Views: 144

Answers (1)

brut
brut

Reputation: 126

See the documentation here. Set a data attribute as such:

data-backdrop="static"

Upvotes: 1

Related Questions