Baze Modal v1.3.0

a jQuery plugin to create simple, accessible and mobile friendly modal dialog.

You look awesome today by the way. (If you're a dude, #nohomo)

Fork me on Github

Getting Started

You can get Baze Modal via Bower

bower install baze-modal --save

or you can download from project respository.

Usage

Include Baze-Modal's CSS and Javascript files along with jQuery.

<head>
    <link rel="stylesheet" href="path/to/baze.modal.css">
</head>
<body>
    <!-- Page content -->

    <script src="path/to/jquery.js"></script>
    <script src="path/to/baze.modal.js"></script>
</body>

then set up the markup like this

<button id="modalTrigger" data-target="#myModal">Open Modal</button>

<div class="bzm-content" id="myModal" data-title="Hello Modal">
    <p>You look awesome today!</p>
</div>

init baze-modal

$('#modalTrigger').bazeModal();

Options

closeOnOverlayClick
Type: Boolean
Default: true
Desc: close modal by clicking the dialog's overlay
onOpen
Type: Function
Default: null
Desc: callback after dialog is opened
onClose
Type: Function
Default: null
Desc: callback after dialog is closed

API

Destroy
$('#modalTrigger').trigger('bazemodal.destroy');

Browsers Support

Baze Modal support all evergreen browsers and IE8+ with graceful degradation.

Comments