Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9042593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T10:32:06+00:00 2026-06-16T10:32:06+00:00

I want to make a screen effect like when you push a button, a

  • 0

I want to make a screen effect like when you push a button, a dialog will appear into the center and the rest of the space will become darker with opacity.

A example will be like the Modal of Boostrap when you click its butoon.

http://twitter.github.com/bootstrap/javascript.html

My understand is to show an element we can simply use .dialog() or etc, the screen effect should be another function used inside of .dialog() or etc.

I want to know, how or what function they are using for this specific screen effect???? I will appreciate that I will have a script example. Thank you very much.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T10:32:07+00:00Added an answer on June 16, 2026 at 10:32 am

    Basically, this is done by overlaying a div on top of all of the current screen elements, and setting its background to black and its opacity to 50%-75%. Then on top of that, centering another div that has your “modal” content in it.

    I would recommend using a library like KendoUI, ExtJS, JQueryUI, etc., but they will all do something similar to the following quick and dirty demo:

    <!DOCTYPE html>
    <html>
    <head>
        <title>Demo</title>
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
        <script>
            $(function () {
                $('#button').click(function () {
                    var blackOverlay = $('<div/>')
                        .attr('id', 'overlay')
                        .css({
                            'position': 'absolute',
                            'width': '100%',
                            'height': '100%',
                            'background-color': 'black',
                            'top': 0,
                            'left': 0,
                            'z-index': 1001,
                            'opacity': .75
                        });
    
                    var modalContent = $('<div/>')
                        .css({
                            'z-index': 1002,
                            'background-color': 'white',
                            'display': 'inline-block',
                            'width': 300,
                            'height': 150,
                            'margin-left': 400,
                            'margin-top': 400
                        })
                        .html('This is the modal content.<br/>');
    
                    var okayButton = $('<input/>')
                        .attr('type', 'button')
                        .attr('value', 'OK')
                        .click(function () {
                            blackOverlay.remove();
                        });
    
                    modalContent.append(okayButton);
    
                    blackOverlay.append(modalContent);
    
                    $('body').append(blackOverlay);
                });
            });
        </script>
    </head>
    <body>
        Here is some content.<br />
        Here is some content.<br />
        Here is some content.<br />
        Here is some content.<br />
        Here is some content.<br />
        Here is some content.<br />
        Here is some content.<br />
        Here is some content.<br />
        Here is some content.<br />
        Here is some content.<br />
        <input id="button" type="button" value="Click Me" />
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make a book page scrolling effect like the picture below. This
I want make 2 button take half of the screen width, but what ever
i want to make a splash screen on my android application, i use phonegap.
I want to make a splash screen, which cannot be clicked/selected by mouse/UI. As
I want to make two tables on single screen, so that if Table A
I am using DirectX to draw on screen. I want to make the image
I want to display an image at the bottom of the screen and make
My situation is like this, I want to programmatically take a print screen of
I am working on android camera app,I want green screen chroma key effect to
I want to make a feature like the one on this page. B&O BeoPlay

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.