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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:16:29+00:00 2026-06-11T15:16:29+00:00

Problem: I have to color my results in the little dropdown based on their

  • 0

Problem: I have to color my results in the little dropdown based on their value.

Solution: Use the ‘open’ event hook to loop through options and assign a color.

Problem: So the documentation for the jQuery UI autocomplete says that the open event hook receives two arguments- ‘ui’ and ‘event’. The problem is, ‘ui’ is just an empty object (someone filed a bug report about this, and the brilliant jQuery UI team said it’s not a problem), and ‘event’ only has the input box, not the dropdown that’s generated. At this point, the only way I can select my options list from here is to do this:

$( event.target ).nextUntil("ul.ui-autocomplete").last().next()

That’s gross. Please tell me there’s a better way?

PS: If anyone says “Just use $(‘ul.ui-autocomplete’)!” you’ve obviously never worked on anything more complicated than…. something that’s not complicated.

  • 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-11T15:16:31+00:00Added an answer on June 11, 2026 at 3:16 pm

    The official documentation is terrible, but after lots of exploring I figured it out:

    $(event.target).data('autocomplete').menu.element
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm starting with open GL and have a little problem, I'm trying to paint
Problem : I have a hand held device that scans those graphic color barcodes
I'm working on a multi-language website. I have a problem with the color of
I have a strange problem getting the color of the point that was touched.
I have the following problem. The background color in a ListView is set LightGreen
Problem: I have a value that is set in $record, for instance 1.69. Then
I can't find solution for the following problem. I have custom list field, which
I have a little problem with my macrocode, and need your advice. Here my
I have a little problem with vbscript I have declared some function with passing
I've got a little problem. I have multiple relative positioned DIVs in an absolute

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.