开发者

putting an overlay over a div

开发者 https://www.devze.com 2023-01-27 13:07 出处:网络
I got a div with some text and a link tag in it, when i click on the link i would like to have an overlay over the div so the opacity is set to .3 or so开发者_如何学JAVAmething and have a little form

I got a div with some text and a link tag in it, when i click on the link i would like to have an overlay over the div so the opacity is set to .3 or so开发者_如何学JAVAmething and have a little form put over it. Does anyone know how to approach this in jquery?


You can use my elementOverlay plugin:

var overlay = $('#yourDiv').elementOverlay();

// some code

overlay.elementOverlay('hide');

Plugin code: https://github.com/jgauffin/griffin.jquery.tools/blob/master/Source/Plugins/jquery.griffin.elementoverlay.js


Just make a div of a fixed size, width and position (the same and place as the original) and set It's background color to slightly transparent.

0

精彩评论

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