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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:51:52+00:00 2026-05-29T07:51:52+00:00

When clicking out of an input field, I’m executing some jquery. If I click

  • 0

When clicking out of an input field, I’m executing some jquery. If I click in and out really quickly it screws everything up. How can I let the current operation finish before starting a new one?

$("#title, #desc").focus(function() {

}).blur(function() {

    var frameHtml = $('.liveDemoFrame').html();
    var liveDemoFrame = $('.liveDemoFrame');
    var previewFrame = $('#previewFrame');

    previewFrame.remove();
    liveDemoFrame.append(frameHtml).hide();
    $('#previewFrame').hide();
    liveDemoFrame.show().append('<p id="loading">Loading...</p>');

    setTimeout(function() { 
        $('#loading').remove();
        $('#previewFrame').fadeIn();
    }, 1000);

});
  • 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-29T07:51:53+00:00Added an answer on May 29, 2026 at 7:51 am

    Somewhere global (ie, above your selector), put

    var myTimeout;
    

    Then in your blur()

    myTimeout = setTimeout(function...
    

    And in the focus()

    clearTimeout(myTimeout);
    

    Now whenever you focus the element, it’ll lose the fadeIn() call.

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

Sidebar

Related Questions

I am using JQuery to create additional input fields via clicking a link. Currently,
I want call OnClick function on page load with out user clicking. Can we
hello there :) Im trying to figure out how i can grab some content
A user types words into an input field, after clicking the Go button, little
A couple of unexpected bugs here that I can't figure out. Clicking the '+'
Clicking on the image should show div near it (.show() in jQuery). But how
When clicking on the text box part of an <input type=file /> in FireFox3,
Upon clicking on a link, I am bringing in some images from a JSON
id like to have an input box that a user can enter a search
In my application you fill in a number in an input field that gets

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.