开发者

jQueryUI or BlockUI modal dialog over PART of a page

开发者 https://www.devze.com 2023-01-26 08:54 出处:网络
I want to have a modal dialog over part of a web page, just a div container. I know a bespoke solution is likely the answer but I\'m wondering if BlockUI can ap开发者_StackOverflow中文版ply it\'s moda

I want to have a modal dialog over part of a web page, just a div container. I know a bespoke solution is likely the answer but I'm wondering if BlockUI can ap开发者_StackOverflow中文版ply it's modal overlay to a specific div only.

Google/stackoverflow has bared no fruit when asking if this is possible with jQueryUI or BlockUI.

Is modifying an existing overlay solution the only answer?


You can create a div with the particular dimensions and position, and then block that.

JS

$('body').append('<div id="blocker"></div>');
$('#blocker').block({message: null});

CSS

#blocker {
    position: absolute;
    top: 50px;
    left: 100px;
    height: 75px;
    width: 150px;
}

Demo →

0

精彩评论

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