开发者

Positioning of jquery.simplemodal popup

I am using jquery.simplemodal plugin and need help regarding the postion of the modal. I've different modals opening at the different position of the page i.e. some at top, middle or bottom. I want the position of the modal to be as per the position it is linked from i.e. bottom, top or middle. Right now, it's 22% from the top and if i click at the bottom, it opens the page at the top leaving 22% margin at the top.

jQuery(function ($) {
$('#confirm-dialog input.confirm, #confirm-dialog a.confirm').click(function (e) {      
    confirm("");                
}); 
});



function confirm(message, callback) {
    $('#confirm').modal({
        closeHTML: "",
        position: ["22%",],
        overlayId: 'confirm-overlay',
        containerId: 'confirm-container',
        onShow: f开发者_如何学Pythonunction (dialog) {
            var modal = this;                   
        }       
    }); 
}


Try to set the modal position as fixed. For more help I'd need to see the html, maybe you can make a jsfiddle

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜