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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:50:17+00:00 2026-05-23T19:50:17+00:00

I am using JQuery to implement a dynamic search option, where as the user

  • 0

I am using JQuery to implement a dynamic search option, where as the user types in the searched text, the list starts to SlideUp() those elements that don’t match, and SlideDown() those that do. I used this site as base, and got it working pretty good, except for one small yet nerving detail.

When i type in a text which for example SlidesUp 2 out of 5 of the lists elements, then when i erase the previously typed in text, then only 4 of them appear (instead of the original 5).
And it is not always the same element the one that remains hidden at the end.

This is my relevant code:

$("#searchTextBoxId").change(function(){}).keyup( function () {
    $(this).change();
});
$("#searchTextBoxId").change(function(){
    var filter = $("#searchTextBoxId").val();
    if (filter){$("#ajaxListView").find("name:not(:Contains("+filter+"))").parent().parent().slideUp();$("#ajaxListView").find("name:Contains("+filter+")").parent().parent().slideDown();      
    }else{
    $("#ajaxListView").find('untipodedom').slideDown();
    $("#mst").text("Amount of elements: "+$("#ajaxListView").find('untipodedom').length);       
    }
}); 

It is even wierder the fact that the output text says 5 (the amount of div’s it should be showing). Any ideas???

  • 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-23T19:50:17+00:00Added an answer on May 23, 2026 at 7:50 pm

    Ok, it took a LONG while to figure this out. It turned out to be something quite silly. I post this in case it eventually turns out to be helpful for someone.

    In the “else” case, the jquery “find” selector wasn’t selecting correctly. I changed it to the following:

    function SlideUpAndDown(filter){
        if (filter){
            $("#cListView").find("name:not(:Contains("+filter+"))").parent().parent().slideUp();
            $("#cListView").find("name:Contains("+filter+")").parent().parent().slideDown();
        } else {
            $("#cListView").find("*").parent().parent().slideDown();            
        }
    }
    

    I used the universal selector ‘*’ in order to select all the items in the CListView. Thats it, works like a charm.

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

Sidebar

Related Questions

I'm looking into using the jQuery UI autocomplete widget to implement user lookup by
I'm stuck trying to implement a user-configurable filter on a table using jQuery (in
I'm using jQuery to implement some ajax features. For example: when a user clicks
I'm trying to implement a live search on my photos site using jQuery and
I am using jQuery UI autocomplete and trying to implement the autoFocus option. The
I am using the jQuery library to implement drag and drop. How do I
I am looking to implement horizontal scrolling using jQuery.SerialScroll (based on jQuery.ScrollTo ). I
I'm using jQuery to post to an ASP .NET Web Service to implement a
How to implement a gmail-like this is taking too long warning message using jQuery
I'm trying to implement chained filter dropdown using just javascript - jquery. The solution

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.