Created
March 20, 2015 12:03
-
-
Save chonz0/ae3b7ce833280f4a9a1b to your computer and use it in GitHub Desktop.
Get new left and top attributes by dragging an element
This file contains 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
$('.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