Skip to content

Commit 04868a3

Browse files
committedMar 5, 2014
feat(draggable): keep container position prop if different than static
1 parent 6f22217 commit 04868a3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/jquery.draggable.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@
7676
var fn = Draggable.prototype;
7777

7878
fn.init = function() {
79+
var pos = this.$container.css('position');
7980
this.calculate_dimensions();
80-
this.$container.css('position', 'relative');
81+
this.$container.css('position', pos === 'static' ? 'relative' : pos);
8182
this.disabled = false;
8283
this.events();
8384

0 commit comments

Comments
 (0)
Please sign in to comment.