Name | Default | Description | Example |
---|---|---|---|
Basic | modal | ||
overlay | ture | background true or false | modal |
overlayClick | false | background click close | modal |
overlayScroll | false | background scroll | modal |
layerWidth | 600 | layer custom width | modal |
layerHeight | 400 | layer custom height | modal |
posTop | auto(center) | layer custom position top | modal |
posBottom | null | layer position bottom | modal |
posLeft | auto(center) | layer custom position left | modal |
layerTarget | null |
Multilayer is possible. (classname input. eg. ".classname") |
modal |
remote | null | callbacks | modal |
<div class="modal">
// layer 1
<div class="modal_dialog">
<div class="modal_content layer1">
<a href="#" class="modal_close" data-dismiss="modal">x</a>
-- content --
</div>
</div>
// layer 2
<div class="modal_dialog layer2 hide">
<div class="modal_content layer1">
<a href="#" class="modal_close" data-dismiss="modal">x</a>
-- content --
</div>
</div>
</div>
html,body {
height: 100%
}
body.ovh {
overflow-y: hidden;
}
.modal {
display: none;
z-index: 50;
}
.modal,
.modal_bg {
position: fixed;
top: 0; left: 0;
width: 100%;
height: 100%
}
.modal_bg {
background: #000;
opacity: .7;
filter: alpha(opacity=70)
}
.modal_dialog {
position: fixed;
top: 50%; left: 50%;
width: 600px;
margin-left: -300px;
background: #fff
}
.modal_content {
position: relative;
padding: 30px;
}
.modal_content .modal_close {
position: absolute;
top: 30px; right: 30px;
display: inline-block;
font-size: 1em;
font-weight: bold;
text-decoration: none;
color: #333;
}
$(select).modal({
// default option
show: true,
overlay: true, // background true or false
overlayClick: false, // background click
overlayScroll: false, // background scroll
overlayClass: '.modal_bg', // background class
layerClass: '.modal_dialog', // layer class
layerWidth: 600, // layer width custom
layerHeight: 400, // layer height custom
posTop: 'auto', // position top custom
posBottom: null, // position bottom
posLeft: 'auto', // position left custom
layerTarget: null, // layer classname or id input
remote: null // callbacks
});