开发者

putting an overlay over a div

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜