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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:52:01+00:00 2026-05-30T19:52:01+00:00

I have an input field and a hidden div. The input is readonly. When

  • 0

I have an input field and a hidden div. The input is readonly. When the user clicks the input, a list of items is proposed using the JQuery UI autocomplete. What I would like and do not manage to achieve, is to trigger an event (removing the hidden class) when the user selects an item from the list. Hope someone can help. Thank you in advance for the replies. Cheers. Marc.

http://jsfiddle.net/fdBHC/1/

My html:

<input id="conditions" type="text" readonly="readonly" /input>
<div id="test" class="hidden">some text</div>​

My css:

input{
    margin:50px;
    border:1px solid black;}

div{
    width:200px
    height:200px;
    background-color:orange;}

.hidden{
    display:none;}

My js:

$(function() {
    var availableTags = [
            "aucune","Prise de contact préalable nécessaire"
        ];
    $("#conditions").autocomplete({
        source: availableTags,
        minLength: 0
    }).click(function() {
        $(this).val("");
        $(this).autocomplete("search");
    });
});​
  • 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-30T19:52:02+00:00Added an answer on May 30, 2026 at 7:52 pm

    There is an event in autocompleter which you can use (if I understand correctly):

    $("#conditions").autocomplete({
        source: availableTags,
        minLength: 0,
        select: function(event, ui) {
            // do something when an item from the list is selected, for example:
            $('#test').remove();
        }
    })...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

With jquery autocomplete I have a hidden input field to store ID because the
I have a hidden input field on a page <div id=SomeDiv> <input type=text name=ID
I have an hidden input field with a value, <form> <input type=hidden value=product/> <select
I have an input field on my page where the user will type in
I have an input field whose name is an MD5 string e.g.: <input type=hidden
I have a hidden field on a form that is created in Razor using
I have a problem with a hidden submit button. I have an input field
Support that I have this hidden field: <input type='hidden' id='handler' name='handler' value='5534882394' /> And
I have a (visibility:hidden) div with a Drop Down menu and a jQuery datepicker
I have an input field where both regular text and sprintf tags can be

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.