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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:23:51+00:00 2026-05-26T23:23:51+00:00

jQuery Autocomplete works by putting a select box on the page and doing this:

  • 0

jQuery Autocomplete works by putting a select box on the page and doing this:

$(".myselect").combobox();

where your select box has a class attached to it called “myselect”.

The combobox() functionality hides your select box, and puts a text box in its place with all of the jQuery UI classes attached.

What I want to do is bind to events on the box that “replaces” the select box. I could attach to one of the jQuery UI classes that are present on that element:

<input class="ui-autocomplete-input ui-widget ui-widget-content ui-corner-left" 
       autocomplete="off" role="textbox" aria-autocomplete="list" aria-haspopup="true"
       aria-describedby="ui-tooltip-0">

However, I don’t want to bind to EVERY combobox text box in my whole application. Is there som way to pass a class name to combobox() in order to have it pass that class name on to the text box that it generates?

UPDATE:

No, that’s not what I’m asking. I can not figure out how to dynamically add a class to the input box that is being rendered. If I could add a class, then I could use a selector to attach to it. Right now, I sure could still use a selector to attach to it, but it would attach to EVERY input box that was generated by combobox in other parts of my application. I don’t want to do that. I only want to bind to the input box on this one page.

How about this. How can I make the combobox example from jQuery AutoComplete put up an alert that says “Hello” after a value has been chosen from the combobox?

  • 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-26T23:23:52+00:00Added an answer on May 26, 2026 at 11:23 pm

    You should be able to just do an addclass on the text box it generates and add whatever class you want.

    $("#textboxId").addClass('className');
    

    That should give you what you need.

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

Sidebar

Related Questions

I am using this JQuery autocomplete plugin . It works, and it's simple. But
I'm doing jQuery autocomplete. Works fine if I put hard codded JSON array. But
I have an jQuery autocomplete field with non latin characters. My Controller has this
Does anyone know if theres a jquery autocomplete library that works similar to the
I'm using the jQuery autocomplete plugin to get a list of locations, which works
using jquery ui 1.8 trying autocomplete Everything works apart from that the ui-menu isn't
I have a jQuery Autocomplete field on an ASP.Net Webform and everything has been
I have a jQuery autocomplete that works in most browsers but only kind of
I am currently using the DevBridge jQuery Autocomplete plugin - it works fine as
I am trying to incorporate jQuery autocomplete. It works fine with Firefox 3.6.. However

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.