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

  • Home
  • SEARCH
  • 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 1103623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:22:05+00:00 2026-05-17T01:22:05+00:00

I am using this, $(#loginanchor1).click(function (e) { e.preventDefault(); $(#signin_menu1).slideDown(slow); }); $(document).mouseup(function (e) { if

  • 0

I am using this,

$("#loginanchor1").click(function (e) {
    e.preventDefault();
    $("#signin_menu1").slideDown("slow");
});
$(document).mouseup(function (e) {
    if ($(e.target).parent("a.loginanchor1").length == 0) {
        //$(".signin").removeClass("menu-open");
        $("#signin_menu1").slideUp("slow");
    }
});

Everything works fine but what happens is when the signin_menu1 is displayed block and i click my mouse button inside the div the div slidesup… I want mouseup function to be prevented when the signin_menu1 is displayed block. So i thought of changing the condition like,

if(($(e.target).parent("a.loginanchor1").length==0) &&( //check the display of the div)

Now how to check the display?

  • 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-17T01:22:06+00:00Added an answer on May 17, 2026 at 1:22 am

    try

    $(document).mouseup(function (e) {
        var $parent = $(e.target).parent("a.loginanchor1");
        if ($parent.length == 0 && !$("#signin_menu1").is(':visible')) {
            //$(".signin").removeClass("menu-open");
            $("#signin_menu1").slideUp("slow");
        }
    });
    

    I’m confused with the problem, but $("#signin_menu1").is(':visible') would check if the div is visible (display:block).

    added notes:

    you may try to check if the $(e.target) is the signin_menu1 or the is inside signin_menu1. do it like this,

    $(document).mouseup(function (e) {
        if ($(e.target).is('#signin_menu1') || $(e.target).closest('#signin_menu1').length > 0) { return ; } // do nothing on mouseup
        var $parent = $(e.target).parent("a.loginanchor1");
        if ($parent.length == 0) {
            //$(".signin").removeClass("menu-open");
            $("#signin_menu1").slideUp("slow");
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 536k
  • Answers 536k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Because the C(99) standard requires (§6.5.3.4/1) The sizeof operator shall… May 17, 2026 at 1:22 am
  • Editorial Team
    Editorial Team added an answer First change this : ([[logbookItems objectAtIndex: i] objectAtIndex: 1] !=… May 17, 2026 at 1:22 am
  • Editorial Team
    Editorial Team added an answer For a queryset of A objects, you can do an… May 17, 2026 at 1:22 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Im using this script for form titles: $(document).ready(function(){ $('.add-news').each( function () { $(this).val($(this).attr('defaultValue')); $(this).css({'color':'#686868'
before this i'm using this function to from 6 month date to today date..
Using this question as the base is there an alogrithm or coding example to
Using this SQL on SQL Server 2005 SELECT CONSTRAINT_NAME FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE TABLE_NAME =
Using this method after the SignOut() call redirects to '...login.aspx?ReturnUrl=%2fmydomainname%2flogout.aspx' so that the user
Using this code, the following execution yields strange results: C 100 R W The
Using this rudimentary example, I can't seem to get Environment Variables to 'take' SetEnv
using this code <?php foreach (glob(*.txt) as $filename) { $file = $filename; $contents =
Using this file as source, I have a situation where I need to retrieve
Using this: Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) I get this output: C:\\Documents and Settings\\[USER]\\Application Data How can I

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.