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

The Archive Base Latest Questions

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

i have one slide panel login box with jquery and its works fine only

  • 0

i have one slide panel login box with jquery and its works fine only close link did’t work
here is javascript code.

 <script type="text/javascript">
$(document).ready(function(){
    $("#login-link").click(function(){
        $("#login-panel").slideToggle(200);
    })
})
$(document).keydown(function(e) {
    if (e.keyCode == 27) {
        $("#login-panel").hide(0);
    }

});

$("#login-close").click(function() {
$("#login-panel").hide(0);
return false;
});

</script>

here is HTML for

<a id="login-link" href="#" title="Login">Login</a>   
<div id="login-panel">
<div style="padding-left:10px;width:190px; height:163px; background-color:#2a2a2a; text-align:left; vertical-align:text-top;">
<form id="login" action="<?php echo osc_base_url(true) ; ?>" method="post">
<table border="0" style="font: normal 10pt Tahoma; color:#fff;">
  <tr>
    <td height="20" valign="top">Email <br>
    <input id="email" type="text" value="" name="email"></td>
  </tr>
  <tr>
    <td height="20" valign="top">Password<br>
    <input id="password" type="password" value="" name="password">
  </tr>
   <tr>
  <td><input type="submit" name="submit" value="Sign In" /></td>
  </tr>
  <tr>
    <td height="25" valign="top">
     <small><a href="#login-close">press ESC or close</a></small></td>
  </tr>
</table>
</form>
</div>

it works perfect and also close the login box when i ESC is pressed.
but it did’t close on link click, it only add #login-close in url

Thanks

  • 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-06T06:07:26+00:00Added an answer on June 6, 2026 at 6:07 am

    You don’t have any element with an id of login-close. Try change your close anchor to this:

    <a href="#login-close" id="login-close">press ESC or close</a>
    

    Also, make sure all your code is inside the document ready function.

    $(document).ready(function(){
        $("#login-link").click(function(){
            $("#login-panel").slideToggle(200);
        });
    
        $(document).keydown(function(e) {
            if (e.keyCode == 27) {
                $("#login-panel").hide(0);
            }
        });
    
        $("#login-close").click(function() {
            $("#login-panel").hide(0);
            return false;
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two sliding panels. I need ONLY ONE panel open at a time.
I am using the following sliding div script: http://www.webdesignerwall.com/demo/jquery/simple-slide-panel.html Currently, the slidetoggle function is
I have developed one of my modules using Dojo. Its gone really well and
I ran into the alignment issues with IE6.Code works just fine with IE8.I have
I have three info panels (divs with IDs of panel-one , panel-two and panel-three
i have a panel having slide toggle effect on click of a button along
I have a a nice jquery slide down effect working here: http://georgedesign.co.uk/test/markupV2/index.html In the
I have one list that I want to take a slice of, reverse that
We create a socket. On one side of the socket we have a server
I have an object Dictionary<int, Dictionary<int, Foo> > on one side, and a function

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.