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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:15:48+00:00 2026-05-20T12:15:48+00:00

Has anyone worked with the LiveUpdate function (may be a bit of a misnomer)

  • 0

Has anyone worked with the LiveUpdate function (may be a bit of a misnomer) found on this page? It’s not really a live search/update function, but a quick filtering mechanism for a pre-existing list, based on the pattern you enter in a text field.

For easier reference, I’m pasting the entire function in here:

jQuery.fn.liveUpdate = function(list){
  list = jQuery(list);

  if ( list.length ) {
    var rows = list.children('li'),
      cache = rows.map(function(){
        return this.innerHTML.toLowerCase();
      });

    this
      .keyup(filter).keyup()
      .parents('form').submit(function(){
        return false;
      });
  }

  return this;

  function filter(){
    var term = jQuery.trim( jQuery(this).val().toLowerCase() ), scores = [];

    if ( !term ) {
      rows.show();
    } else {
      rows.hide();

      cache.each(function(i){
        var score = this.score(term);
        if (score > 0) { scores.push([score, i]); }
      });

      jQuery.each(scores.sort(function(a, b){return b[0] - a[0];}), function(){
        jQuery(rows[ this[1] ]).show();
      });
    }
  }
};

I have this list, with members as the ID. And a text field with say, qs as ID.

I tried binding the function in the following manner:

$( '#qs' ).liveUpdate( '#members' );

But when I do this, the function is called only ONCE when the page is loaded (I put in some console.logs in the function) but never after when text is keyed into the text field. I also tried calling the routine from the keyup() function of qs.

$( '#qs' ).keyup( function() {
    $( this ).liveUpdate( '#members' );
});

This ends up going into infinite loops (almost) and halting with “Too much recursion” errors.

So can anyone please shed some light on how I am supposed to actually implement this function?

Also while you are at it, can someone kindly explain this line to me:

var score = this.score(term);

What I want to know is where this member method score() is coming from? I didn’t find any such method built into JS or jQuery.

Thanks for all the help,
m^e

  • 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-20T12:15:49+00:00Added an answer on May 20, 2026 at 12:15 pm

    score() comes from the Quicksilver library. This isn’t extremely clear in the post, but John answers the same question in the comments.

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

Sidebar

Related Questions

Has anyone worked with DSLs (Domain Specific Languages) in the finance domain? I am
Has anyone worked much with Microsoft's Managed Extensibility Framework (MEF)? Kinda sounds like it's
Has anyone worked with the StarTeam COM API (Specifically, intergrating with C#). I need
Has anyone run into this error message before when using a timer on an
Has anyone worked with JFreeChart-open source library for plotting xy plots? Could someone post
Has anyone worked with .Net code to read/manage VLQs? There is a Java method
has anyone worked with gmail with vb.net? how do i access my inbox and
Has anyone worked with a programmer with a radically different coding style? How do
Has anyone worked on the XAML browser(xbap) application? How is it different from a
Has anyone worked with the programming language Church ? Can anyone recommend practical applications?

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.