-
Notifications
You must be signed in to change notification settings - Fork 601
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
How to check if choice has been already selected for an element? #826
Comments
I want following behaviour
|
Looking for something similar to this anyone found a solution? |
I found a solution for this, but maybe not the best one - but so far it works.
(I'm fetching this as an jQuery object for other purposes, but choicesJS can't handle the jQuery object and expects a DOM object) |
You saved me bro! Thank you. |
how can i disable it, if already initialising or how can i add or remove values into already initialised element. |
Could you help me complete the ???? part please `$.each($(".choices-single"), function(key, value) { if(element.data('choice') !== 'active') { })` |
@Hel5ing what do you want to achieve in your ???? part? |
I have following function which selected mutiple fields and makes it searchable.
If I call this function twice like below, I'll get the following error in my console log
Error:
Is there a way to check if an Choice has already been selected for an element?
The text was updated successfully, but these errors were encountered: