-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not trigerring railsAutocomplete.select #101
Comments
Seconded, and I'm actually having a really hard time even finding a workaround. @rafaeelaudibert did you come up with a solution? |
I checked a click on the .ui-menu class, just like the following: $('.ui-menu').click(e => {
$(`#button-add-support`).show(80);
}); It is almost the same, but it would be really beter if we had the proper event working |
good lord.. this is exactly what i'm trying to do and I can't understand why it's not working.
the first function returns the expected jquery object ( Even Thanks for responding. |
For posterity: I realise now that I was attempting to bind a function to an element that didn't yet exist. Thus, this was the solution I came up with.
Here, we only bind the event handler once we're sure the target element exists. |
Yes, you are totally right. Now looking to my code, I wrap that call on a call to the autocomplete-input click event, so that I can add it just when it is created |
For anyone stuck trying to get this to work, I just skipped using the gem helpers and used jQueryUI directly. Maybe not the best solution for every case, but luckily worked in mine. Instead of using
|
Hey, I have the following snippet of code, and I'm trying to catch your event when I select something on my Rails website, but it doesn't catch the event, just like if it is not being fired
And this is my JS trying to catch the event
The event is not fired, so it can't be retrieved and I don't understand why
The text was updated successfully, but these errors were encountered: