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 8179233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:57:24+00:00 2026-06-06T23:57:24+00:00

I am trying to make a box pop up when i click on it.

  • 0

I am trying to make a box pop up when i click on it. Here is the HTML for the boxes:

<div id="content_1">
    <p>Hello</p>
    <p>Please push the button</p>
    <p><input type="button" id="go_button" value="Go"/> </p>
</div>
<div id="box">
    <p>hello</p>
</div>

Here is the JavaScript and CSS:

$(document).ready(function() {
    $("#content_2").on("click",function(){
    .css("z-index",3);
    }
}

Here is the styling just in case it’s needed:

#go_button {

}
#content_1 {
margin:20px auto;
position:fixed;
width:1000px;
text-align:center;
border:1px solid #d0d0d0;
box-shadow:1px 1px 5px #aaa;
border-radius:15px;
background:#99FF99;
z-index:3;
}
#box {
position:fixed;
top:100px;
left:300px;
z-index:1;
width:600px;
height:300px;
background:green;
}
body {
background:#f7f7f7;
}
  • 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-06T23:57:25+00:00Added an answer on June 6, 2026 at 11:57 pm

    It looks like you aren’t applying the css to anything:

    $(document).ready(function() {
    $("#content_2").on("click",function(){
            $('#box').css("z-index",3);
        }
    }
    

    Also, #content_2 isn’t defined.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to make a button to add another input box every time
I'm trying to make a pop up message box with Hello World written on
I'm trying to make the input box (on the JSFiddle attached) with the serialize
I am trying to make an input box where the input box gets empty
I am trying to make a custom check box and radio button in pure
Im trying to make a pop-up like window using jquery and its modal box.
Im trying to make a popup div (when a text-box value changes) and it
I have been trying to make a DIV box appear in front of the
I'm trying to make a check box to show/hide a HTML element, but I
I am trying to make it so when i click outside the box the

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.