sumit
sumit

Reputation: 11257

How to darken a webpage and show another webpage over it (images attached)?

I want to show a pop-up kind of webpage on another webpage by darkening it as a background as shown in below images. Can you please help me understanding how this can be achieved? Thanks!

Example 1: The background webpage is darkened

Upvotes: 0

Views: 779

Answers (3)

nrabinowitz
nrabinowitz

Reputation: 55678

There are plenty of pre-packaged Javascript plugins that will do this for you - many use jQuery. Try ColorBox - it will probably do most of what you want out of the box, with little coding.

For a working example that loads another website, see this ColorBox examples page and click on "Outside Webpage (Iframe)".

Upvotes: 2

Joe
Joe

Reputation: 82614

I would use one of these free, already created solutions. It's called Light Box

Upvotes: 1

natedavisolds
natedavisolds

Reputation: 4295

There are a lot of plugins that help you add this behavior (called light window). If you are using jquery, I can recommend colorbox http://colorpowered.com/colorbox/ as I've used it, but there are a bunch of other great plugins. Google 'javascript light window'.

Upvotes: 2

Related Questions