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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:14:12+00:00 2026-05-25T20:14:12+00:00

jQuery is not working with the pop-up div. What happens is when i click

  • 0

jQuery is not working with the pop-up div. What happens is when i click on any of the Click Me text, the pop-up div is shown. Then i click on either one or two and nothing happens!? If i click on one, two should disappear and vice versa.

Copy the code below and try for yourself. What’s the solution?

  <html>
    <head>
    <style type="text/css">
    .ratecontainer {
    display:block;
    float:left;
    height:40px;

    }
    .ratecontainer a {
    color:#FFFFFF;
    text-decoration:none;

    }

    .ratebutton1 {
    padding:5px;
    color:#FFFFFF;
    cursor:pointer;
    background-color:#59758d;
    }

    .ratebutton1:hover {
    background-color:#4a6f8e;

    }
    .ratebutton2 {
    padding:5px;
    color:#FFFFFF;
    cursor:pointer;
    background-color:#59758d;
    }

    .ratebutton2:hover {
    background-color:#4a6f8e;

    }

    #info {
    position:absolute;
    text-align:left;
    width:950px;
    height:auto;
    top:100px;
    left:50%;
    z-index:20;
    margin-left:-475px;

    border:1px solid #000000;
    background-color:#FFFFFF;
    display: none;


    }

    </style>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    </head>

    <body>
    <script type="text/javascript">
    $(function() {

        $('.ratebutton1').click(function() {

            $('.ratebutton2').hide();

        });

        $('.ratebutton2').click(function() {

            $('.ratebutton1').hide();

        });

          $('.infobutton').click(function() {

var id = $(this).attr('id');
var row = '#box'+id;

$('#info').css('display','block');
var ninfo = $(row).html();
$('#info').html(ninfo);
});

    });



    </script>

     <div id="info"></div>


<div class="menucontainer"><a id="0" class='infobutton'>Click Me </a></div>
<div style="display:none;" id="box0">

    <div class="ratecontainer">
        <form  action="">
            <a class="ratebutton1">One</a><a class="ratebutton2">two</a>
        </form>
    </div>



</div>

    </body>
    </html>
  • 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-05-25T20:14:13+00:00Added an answer on May 25, 2026 at 8:14 pm

    I created a stub fiddle for your code: http://jsfiddle.net/guard/P4KYL/

    Edit it removing any php-related cruft (and manually put multiple items where necessary)

    Then post the edited version back and I’ll check what’s wrong with it.

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

Sidebar

Related Questions

Any ideas why this jquery is not working? $(div.aboutText p a).each( function() { $(this).replace('
can anybody tell me why is the following code not working? <script type=text/javascript src=../../Scripts/jquery.js></script>
Ajax Jquery form not working vs div why its happen and how can i
This function is not working, the popup (div #pop_member) doesn't show. I'm using jQuery
The following JQuery function is not working entirely. IE 7 processes both alerts, but
Using jQuery, the following is not working in FF, but it is in IE
I don't know what is going but my jquery validate plugin(1.5.5) is not working
Does anyone know why .hide(normal) does not seem to be working in jQuery 1.4.2?
Is there any reason why JQuery would not work when used in an ASPX
My jQuery is not working as expected: I am trying to loop through each

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.