Created
September 29, 2021 02:52
-
-
Save inderpreet99/83d54ed9015661c4eec230e4ba59962d to your computer and use it in GitHub Desktop.
Drag drop waivers rather than using dropdowns on Yahoo Fantasy Football edit waivers page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// works on https://football.fantasysports.yahoo.com/f1/483108/1/editwaivers pages | |
YUI().use('sortable', function (Y) { | |
var sortable; | |
// Our sortable list instance. | |
sortable = new Y.Sortable({ | |
container: '.Table tbody', | |
nodes : 'tr', | |
opacity : '0.1' | |
}); | |
sortable.delegate.after('drag:end', function (e) { | |
var node = sortable.delegate.get('currentNode'), | |
prev = node.previous(), | |
next = node.next(), | |
msg = 'Moved ' + node.get('text'); | |
// todo: reset priorities | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment