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

jquery document on support #4

Open
twilly86 opened this issue Jul 27, 2016 · 1 comment
Open

jquery document on support #4

twilly86 opened this issue Jul 27, 2016 · 1 comment

Comments

@twilly86
Copy link

Is there any way to use dragcheck with jquery on function?

http://api.jquery.com/on/

I'm using drag check on an angular app and a huge amount of my checkboxes are dynamically generated by angular.

Everytime angular changes a checkbox, my dragcheck events are lost.

How do I keep angular and dragcheck in sync is my basic question?

I'm using dragcheck inside a table which angular popultes..

example

<table>
   <tr ng-repeat="x in xs">
   <!-- this checkbox is dynamically generated by angular and can change via pagination and other events -->
   <td><input type="checkbox"/></td>
 </tr>
</table>
@scarlac
Copy link
Owner

scarlac commented Jul 27, 2016

Hi Twilly

I don't have official angular/React support yet, meaning there's no official way to add and remove checkboxes dynamically.

BUT... that being said. If you call DragCheck.attachEvents([ element1, element2, etc. ]) manually with whatever items have been added, then it should work in theory (have not tried it myself). One way to do so is using the MutationObserver API but take note of the browser support.

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