Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save inderpreet99/83d54ed9015661c4eec230e4ba59962d to your computer and use it in GitHub Desktop.
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
// 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