Git Product home page Git Product logo

Comments (2)

toddself avatar toddself commented on July 29, 2024

So upon further examination of the code, I noticed that I can set an onItemSelect hook.

But this wasn't working.

elem.focus() was causing the method to exit prematurely before the onItemSelect hook could be called.

Moving elem.focus() to the last line of the method seems to resolved. I'll make a pull request for you.

I'd also love to help out with your documentation :)

from jquery-autocomplete.

dyve avatar dyve commented on July 29, 2024

Use the onItemSelect hook, see example

On Tue, Mar 20, 2012 at 19:38, Todd Kennedy
[email protected]
wrote:

When using the JSON results I'm taking the data returned from the server and processing it using a processData function to return the following:

[
   {name: 'name', data: {id: 123}},
   {name: 'name', data: {id: 234))
]

However I am flummoxed on how to get the id value when the user has selected an option.  I don't see it when I do $('#ac_input').val() or easily recognizable within the .data().autocompleter object.

Is this data available somewhere in an easily accessible location?


Reply to this email directly or view it on GitHub:
#33

from jquery-autocomplete.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.