Created
October 17, 2010 12:25
-
-
Save bebraw/630800 to your computer and use it in GitHub Desktop.
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
var draggable = new Draggable(this.options.id, { | |
handle: header, | |
range: {x: [0, window.innerWidth], y: [0, window.innerHeight]} }); | |
draggable.oldStyle = $(this.options.id).get('style').cssText; | |
draggable.onStop(function() { | |
var top = this.element.getStyle('top'); | |
var left = this.element.getStyle('left'); | |
var width = this.element.getStyle('width'); | |
var zIndex = this.element.getStyle('z-index'); | |
this.element._.setAttribute('style', this.oldStyle); | |
this.element.setStyle({top: top, left: left, width: width, | |
'z-index': zIndex}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment