Skip to content

Commit 3bd78a1

Browse files
committed
merge conflict with stash fixed
1 parent 93786ba commit 3bd78a1

File tree

2 files changed

+37
-8
lines changed

2 files changed

+37
-8
lines changed

css/secrets.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,13 @@ svg {
1313
}
1414

1515
.cell:hover, .cell:visited, .cell:focus {
16-
<<<<<<< HEAD
1716
/* animation: loaderAnim 5s ease-in-out infinite normal forwards; */
18-
=======
19-
animation: rotate 5s ease-in-out infinite normal forwards;
20-
>>>>>>> 96fb828ccb758a7ae33f0cedc2cd03aebf2ba725
2117
padding: 0;
2218
margin: 0;
2319
}
2420

2521

26-
<<<<<<< HEAD
2722
/* @keyframes loaderAnim {
28-
=======
29-
@keyframes rotate {
30-
>>>>>>> 96fb828ccb758a7ae33f0cedc2cd03aebf2ba725
3123
0% {
3224
transform:rotate(0deg);
3325
}

js/2secrets.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ function setup() {
2828
makeGrid(rows, cols);
2929
shapes = makeFlowers(radius);
3030
addSvgsToCells(size, padding);
31+
fixCellPosiiton();
32+
addOnClickToCells();
3133
}
3234

3335
function addSvgsToCells(size, padding) {
@@ -41,6 +43,41 @@ function addSvgsToCells(size, padding) {
4143
two.add(shape);
4244
two.update();
4345
});
46+
// get position of cell, set position to fixed with left and right set
47+
48+
}
49+
50+
function fixCellPosiiton() {
51+
$(".cell").each(function (i, o) {
52+
$(this).parent().css({position: 'relative'});
53+
var top = $(this).offset().top, left = $(this).offset().left;
54+
console.log(top);
55+
console.log(left);
56+
// console.log($(this).offset());
57+
$(this).css({top: top, left: left, position:'absolute'});
58+
// console.log($(this).offset());
59+
});
60+
// console.log($("#cell20").offset());
61+
}
62+
63+
function addOnClickToCells() {
64+
$('.cell').click(function () {
65+
$(this).css('transition', 'scale()');
66+
var kiddo = this.children[0];
67+
if (typeof kiddo !== 'undefined') {
68+
// Expand child SVG to 200px
69+
$(this).animate({width: "200px"}, 500);
70+
setTimeout(function() {
71+
// 500 ms later, expand height to 800px
72+
$(this).animate({height:"800px"}, 500);
73+
}, 500);
74+
setTimeout(function() {
75+
// 1s later show text
76+
// object.children.find
77+
});
78+
}
79+
80+
});
4481
}
4582

4683
function makeGrid(rows, cols) {

0 commit comments

Comments
 (0)