-
I'm not sure if funtion can have actual javascript code in it, or if it has to be whatever is listed for the options. |
Beta Was this translation helpful? Give feedback.
Answered by
owen-m1
Jan 21, 2021
Replies: 2 comments
-
Of course it can have code in it, that's what its for :) new Sortable(el, {
onEnd: function() {
console.log(el.firstElementChild.textContent); // Log text content of first child
}
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
owen-m1
-
Thanks! That's very helpful. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Of course it can have code in it, that's what its for :)
Try this (where el is the sortable element):