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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T01:02:25+00:00 2026-06-17T01:02:25+00:00

I need to make a search by using jquery, I have an : input

  • 0

I need to make a search by using jquery, I have an :
input text with this id idTextSearch:

<input id="idTextSearch" name="name" type="text" style="width:70%;"  >

input button with this id idButtonSearch:

<input id="idButtonSearch" type="button" value="Search" onclick="searching()" class="alt_btn">

and a <ul class="toggle" id="idUl"> with different <li value="thisIsAValue">

Now, I need to create my searching(), this function will hide all elements field different to $("#idTextSearch").val() and show only one field with the same value of this input text.

  • 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-17T01:02:27+00:00Added an answer on June 17, 2026 at 1:02 am

    Next time, please post what you’ve tried to do to solve the problem. In this case I’ll give you the answer because it’s simple, but we’re here to help you, not to write all your code for you.

    Note that the value attribute technically doesn’t exist on the li element, you should prefix it with data. Eg:

    <li data-value="thisIsAValue">
    

    And the javascript/jQuery:

    $('#idButtonSearch').on('click', function(e) {
        e.preventDefault();
    
        $('#idUl li').hide().each(function() {
            if ( $(this).data('value') === $('#idTextSearch').val() ) {
                $(this).show();
            }
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to make a synonym search function, using MySQL. Here is the tables
I am trying to make search on my database using Solr, and i need
This is a JavaScript/Ajax webpage (also using jQuery). I have a nested structure I
I need to make a series (1-20) ajax calls and I need to have
We have a thick client app using jQuery heavily and want to profile the
http://removed.com/jquery/test.html# I have three problems that I need help with. 1 ) When you
When using jQuery .animate(width: value) it animates the width from left to right. So
I have been using http://benalman.com/projects/jquery-bbq-plugin/ push and react to URL's (AJAX loaded URLS)... Currently
I need to make a simple search across select box with single selection. Main
NOTE: using jQuery 1.3.2 (Yep I'm upgrading but still need to be at 1.3.2

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.