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

How to revert back after after drop if condition not matched #677

Open
shivanigajewar2018 opened this issue Apr 20, 2021 · 1 comment
Open

Comments

@shivanigajewar2018
Copy link

Please check attached file

dragula.zip

m/bevacqua/dragula/blob/master/.github/contributing.markdown
[slack]: https://dragula.slack.com

@Lucase84
Copy link

Lucase84 commented Jun 4, 2021

This works perfectly for me:

.on('drop', function (el, target, source) {
    if (CONDITION) {
        $(el).remove();
        $(source).append(el);
    }
}

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