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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:01:34+00:00 2026-06-18T06:01:34+00:00

Trying to hide a div after it loses focus or on blur. I have

  • 0

Trying to hide a div after it loses focus or on blur. I have a simple form and am providing some guidelines to users when the focus on the field either by touch or click (this is a site for mobile). It is working as I would like for show, but I have to click on the field again to get the div to hide again.

HTML:

 <input type="text" id="usernameCL" name="usernameCL" placeholder="Create a Username" autocomplete="off" autocorrect="off" class="field_hints"/>
<div id="usernameCL" class="tooltip_static" style="display:none"> This be my field hint</div>

This be my other field hint

JQuery Function using 1.6.4 JQ:

$().ready(function () {
    $('.field_hints').bind('focus',
     function()
     {
       var field = this.id;
       var div = $('.tooltip_static[id='+field+']');

       if(div.css('display') == 'none')
       {
         div.show(function()
         {
           div.slideUp("fast");
         });
       }
      else
      {
        div.hide('blur');
      }
    });
  });

And here is a fiddle:
http://jsfiddle.net/LapPA/

Anyone know how to get this to hide on blur or mouse out?

  • 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-18T06:01:35+00:00Added an answer on June 18, 2026 at 6:01 am

    You need a separate handler bound to the blur event.

    For example, you could do this:

    $().ready(function () {
      $('.field_hints').bind('focus',
        function()
        {
          var field = this.id;
          var div = $('.tooltip_static[id='+field+']');
    
          if(div.css('display') == 'none')
          {
            div.hide(function()
            {
              div.slideDown("fast");
            });
          }
        }).bind('blur', 
            function()
            {
                var field = this.id;
                var div = $('.tooltip_static[id='+field+']');
                div.hide();
            });
      });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to show a div AFTER all other animations have finished. The code
I am trying to get a form field value after the form has been
I am trying to hide a div after a user clicks on the document.
I'm trying to make a simple Click on Div -> Hide DIV -> Show
Trying to show/hide severals divs using jquery after each news on my page. <div
I've been trying to auto-focus on an input field called #to after someone clicks
I have a form that i am trying to submit after the page loads
I am trying to hide the div class hideme based on value of full_day
I'm trying to hide a div in my template if the URL that is
I am trying to hide a div with an id #op-four using on instead

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.