Skip to content
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

Trigger reset selected or change data values #32

Open
Contemp opened this issue Oct 17, 2020 · 1 comment
Open

Trigger reset selected or change data values #32

Contemp opened this issue Oct 17, 2020 · 1 comment

Comments

@Contemp
Copy link

Contemp commented Oct 17, 2020

Hi,

I'm working on a form that allows to edit a product and its variations. My (single) Selectators are therefore filled with data proceeding from the DB, retrieving the previously both selected and unselected options.

On click on a "Clear data" button, (I have several ones along my form), I'm trying to either :

  • change the content of a selected item (value, data-left, text...)
    or
  • append a new empty option as selected, with value, data-left & text =""
    or
  • trigger click on Selectator close button.
    // $("#variation_1 .selectator_selected_item_remove").trigger('click'); doesn't work. How do I target it ?

None of these solutions work, and it's a little brainstorming as it reads divs instead of options in the console.

Anticipate thanks & regards :)

@ingipingi
Copy link
Contributor

I don't really understand what you are trying to do, but I've updated the code and demo and readme; fixing 1 bug, and adding two new methods which might help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants