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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:44:45+00:00 2026-05-26T08:44:45+00:00

I have two statements. What I am trying to do is when someone clicks

  • 0

I have two statements. What I am trying to do is when someone clicks on #area_a then hide then entire #area_b div without activating the focusout for the #area_b_textbox. But I’ve tried different code (which I am not including here because it is incorrect and want to get your suggestions) and what is happening is it is activating the focusout everytime I click on the #area_a div.

JQuery base actions

$("#area_a").click(function() { $("#area_b").hide(); });

$("#area_b_textbox").focusout(function() {$("#area_b_error").show();});

HTML:

<div id="area_a"></div>

<div id="area_b">
  <input id="area_b_textbox">
  <div id="area_b_error"></div>
</div>

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-05-26T08:44:46+00:00Added an answer on May 26, 2026 at 8:44 am

    You could hack around the problem with a timer. Timers usually smell bad but I think it is your safest bet here. If you try using hover or other mouse events you might run into trouble with keyboard navigation and activation or the lack of “hoverish” events on touch interfaces (and we can’t pretend those don’t exist anymore).

    Something like this:

    var timer_kludge = {
        start: function(fn) {
            this.id = setTimeout(fn, 200);
        },
        stop: function() {
            if(this.id)
                clearTimeout(this.id);
            this.id = null;
        },
        id: null
    };
    
    $('#area_a').click(function() {
        timer_kludge.stop();
        $('#out').append('<p>click</p>');
    });
    $('#area_b_textbox').focusout(function() {
        timer_kludge.start(function() {
            $('#out').append('<p>textarea focusout</p>');
        });
    });
    $('#area_b_textbox').focusin(function() {
        timer_kludge.stop();
    });
    

    Demo: http://jsfiddle.net/ambiguous/s8kw8/1/

    You’d want to play with the 200 timeout a bit to see what works best in your circumstances.

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

Sidebar

Related Questions

I have two select statements that I am trying to port from Oracle to
I have two insert statements, almost exactly the same, which run in two different
I have two LINQ statements that I would like to make into one, but
I have tried the following two statements: SELECT col FROM db.tbl WHERE col (LIKE
I have two tables: entitytype and project . Here are the create table statements:
I have two text inputs and I am trying to insert their values into
In MySQL I have two tables, tableA and tableB . I am trying to
I have two tables, where only one column is the same. I am trying
ok so this is what I am trying to achieve is to have two
Here is what i am trying to do. I have two bit fields in

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.