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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:41:04+00:00 2026-06-18T11:41:04+00:00

hope this is the right stack for this question. I am having issue with

  • 0

hope this is the right stack for this question.

I am having issue with my tooltips vs errormessages. my tooltips are set to display on “Focus” in each text well, they appear and disapear as you tab through the wells a few have error messages if the data entered does not fit the criteria. the trouble is the error message pops up then the focus shift to the next box closing the error message before it can be read. the focus automatically shifts back to the incorrectly entered box okay but then the original tooltip appears.

Is there a way to cancel the “change focus” or “blur” functions if the field is incorrect, set the time for the error message to be displayed or delay “blur” somehow so that the error message remains for at least 5-10 seconds?

Thank you for your time and consideration
Winston

  • 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-18T11:41:06+00:00Added an answer on June 18, 2026 at 11:41 am

    You can use setTimeout to set a variable once 5 seconds have passed before blur is triggered. If that’s not the case you can hide the message in the setTimeout handler instead.

    var focusAtLeastFiveSecondsAgo;
    $(thing).focus(function(){
        showMessage();
        focusAtLeastFiveSecondsAgo = false;
        setTimeout(function(){
             focusAtLeastFiveSecondsAgo = true;
             if (!$(thing).is(":focus")){
                  hideMessage();
             }
        }, 5000);
    });
    $(thing).blur(function(){
        if (focusAtLeastFiveSecondsAgo){
             hideMessage();
        }
    });
    

    Notice that we check if the element is still focussed in the setTimeout handler. If it isn’t blur has been triggered but was ignored because the message was only just displayed.

    For code readability you might want to create a jQuery plugin for this that stores the variable and handles the minimum delay.

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

Sidebar

Related Questions

I hope this question isn't too open ended, but a nudge in the right
I hope someone can help me here. I'm having trouble loading this variable. Right
First time posting in Stack Overflow, hope I'm doing this right. I'm writing an
this is my first question on stack overflow, I hope you can help me.
This is something of an architectural question - I hope this is the right
Hope this is the right place to be asking this, so my apologies if
I hope this is the right place to ask this. I would like to
My first post here, so i hope this is the right area. I am
I hope I can explain this right I have two input fields that require
I hope I can explain this problem right, it's a bit confusing for me.

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.