Skip to content

Commit 12b0fe3

Browse files
committed
animate
1 parent 1b290a2 commit 12b0fe3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
position: relative;
77
}
88
.row {
9+
position: absolute;
910
margin: auto;
1011
text-align: left;
1112
}
@@ -76,6 +77,7 @@
7677
this.addRow = function (rowElement, isEven) {
7778

7879
$timeout(function () {
80+
7981
// calculate top
8082
var selector = isEven ? 'left' : 'right';
8183
var top = Math.max(topOffsets[selector], topOffsets.middle);
@@ -85,8 +87,7 @@
8587
topOffsets.middle = top + BOX_HEIGHT;
8688

8789
// change position
88-
rowElement.css({
89-
position: 'absolute',
90+
rowElement.animate({
9091
top: top+'px'
9192
});
9293
});

0 commit comments

Comments
 (0)