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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:26:40+00:00 2026-05-31T03:26:40+00:00

I have this piece of code: $(input).keyup(function() { var searchTerms = getSearch(); doSearch(searchTerms); });

  • 0

I have this piece of code:

$(input).keyup(function() {

    var searchTerms = getSearch();
          doSearch(searchTerms); 

}); 

The function doSearch gives me a list of results (search results). I would like to mimic Google by ‘fading’ out the results on keyup then set a timer or event .delay and then do the function which is providing the results, so:

  1. keyup –> fade out 50%
  2. wait a period of time
  3. do function doSearch(searchTerms);

I know how to do the events but I cant seem to put them all together.

  • 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-31T03:26:41+00:00Added an answer on May 31, 2026 at 3:26 am

    jQuery happens to have two things to solve this.

    .delay()

    and

    jQuery.queue()

    If you want to delay e.g. the trigger function you either need to queue it in the fx-queue or in a separate queue. Here is how that works:

    $("#myElement").delay(2000).queue(function(){ 
      var searchTerms = getSearch();
      doSearch(searchTerms); 
      $(this).dequeue(); 
    });
    

    If you don’t want to use the default fx-queue, this is how to queue the function in your own queue:

    $("#myElement").delay(2000, "myQueue").queue("myQueue", function(){ 
      var searchTerms = getSearch();
      doSearch(searchTerms); 
    }).dequeue("myQueue");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this piece of code: $(#faq).click(function () { var url = $.get(faq, {
I have this piece of code: var myObj = function () { this.complex =
So I have this piece of code: var thisValue = $(input[id*=ID222]).val(); thisValue = thisValue.replace(',','');
I have this piece of code in javascript: var catId = $.getURLParam(category); In my
I would like to have this piece of code in my .aspx file: <input
I have this piece of simple code. <html> <head> <script type=text/javascript> function changeText() {
I have this piece of code: public static DateTime calcMondayDate(DateTime input) { int delta
I have this piece of code and it's causing NullPointerException private List<Player> playerList; private
I have this piece of code: <input type=text name=desc id=desc onchange=OnDescChange(); /> but it
I have this piece of javascript: <script type=text/javascript> function show_confirm() { var type =

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.