Revision cc570918 ui/templates/home.html
b/ui/templates/home.html | ||
---|---|---|
69 | 69 |
} |
70 | 70 |
}); |
71 | 71 |
}); |
72 |
// what should work
|
|
72 |
// what should be working
|
|
73 | 73 |
/* |
74 |
$("#arrow").click(function(event){ |
|
75 |
$(this).addClass("clicked"); |
|
74 |
$(".inactive#arrow").click(function(event){ |
|
75 |
$(this).removeClass("inactive"); |
|
76 |
$(this).addClass("active"); |
|
76 | 77 |
$(this).rotateAnimation(90); |
77 | 78 |
}); |
78 | 79 |
|
79 |
$(".clicked").click(function(event){ |
|
80 |
$(this).removeClass("clicked"); |
|
80 |
$(".active#arrow").click(function(event){ |
|
81 |
$(this).removeClass("active"); |
|
82 |
$(this).addClass("inactive"); |
|
81 | 83 |
$(this).rotateAnimation(0); |
82 | 84 |
}); |
83 | 85 |
*/ |
84 | 86 |
|
85 | 87 |
// what is working |
86 |
var counter = 1; |
|
87 |
var angle; |
|
88 |
|
|
89 | 88 |
$("#arrow").click(function(event){ |
89 |
var state = true; |
|
90 | 90 |
$(this).rotate({animateAngle: (90), bind:[{ |
91 | 91 |
"click":function(){ |
92 |
if (counter % 2 == 0)
|
|
92 |
if (state) {
|
|
93 | 93 |
$(this).rotateAnimation(90); |
94 |
else |
|
95 |
$(this).rotateAnimation(0); |
|
96 |
counter += 1; |
|
94 |
state = false; |
|
95 |
} |
|
96 |
else { |
|
97 |
$(this).rotateAnimation(0); |
|
98 |
state = true; |
|
99 |
} |
|
97 | 100 |
}}] |
98 | 101 |
}); |
99 | 102 |
}); |
103 |
|
|
100 | 104 |
</script> |
101 | 105 |
</body> |
102 | 106 |
</html> |
Also available in: Unified diff