Skip to content

Instantly share code, notes, and snippets.

@chonz0
Created March 20, 2015 12:03
Show Gist options
  • Save chonz0/ae3b7ce833280f4a9a1b to your computer and use it in GitHub Desktop.
Save chonz0/ae3b7ce833280f4a9a1b to your computer and use it in GitHub Desktop.
Get new left and top attributes by dragging an element
$('.animatable_elements').draggable({
start: function( event, ui ) {
//console.log( event );
//console.log( ui );
},
stop: function( event, ui ) {
//console.log(ui);
console.log('New Position Left: ' + Math.round(ui.position.left));
console.log('New Position Top: ' + Math.round(ui.position.top));
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment