Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
position: relative;
border: 3px solid green;
}

i {
position: absolute;
}
Expand All @@ -23,8 +24,9 @@
<script src="scripts/jquery-ui.min.js"></script>
</head>
<body>
<h1>Play Chicken!</h1>
<div class="playspace"></div>
<h1>Democracy</h1>
<div class="playspace"></div>

<p><em>refresh to see it again</em></p>
<script src="scripts/iconomation.js"></script>
</body>
Expand Down
84 changes: 67 additions & 17 deletions scripts/iconomation.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,81 @@
// add icons
$('.playspace').append('<i class="em em-rooster"></i>');
$('.playspace').append('<i class="fa fa-futbol-o"></i>');


$('.playspace').append('<i class="em em-two_men_holding_hands"></i>');

$('.playspace').append('<i class="em em-woman"></i>');
$('.playspace').append('<i class="em em-older_woman"></i>');
$('.playspace').append('<i class="em em-man"></i>');
$('.playspace').append('<i class="em em-older_man"></i>');
$('.playspace').append('<i class="em em-person_with_blond_hair"></i>');

$('.playspace').append('<i class="em em-thumbsup"></i>');

// set the initial positions

$('.em-rooster').css({
top: 200,
$('.em-two_men_holding_hands').css({
top: 100,
left: 300
});

$('.fa-futbol-o').css({
top: 210,
left: 100
$('.em-woman').css({
top: 300,
left: 200
});
$('.em-older_woman').css({
top: 300,
left: 250
});
$('.em-man').css({
top: 300,
left: 300
});
$('.em-older_man').css({
top: 300,
left: 350
});
$('.em-person_with_blond_hair').css({
top: 300,
left: 400,
});

$('.em-thumbsup').css("visibility", "hidden");

// play!
// vote!

$('.em-rooster').animate({
left: 50
$('.em-two_men_holding_hands').animate({
top: 70
}, 1000);

// after 660ms...
setTimeout(function() {
// ...move the ball
$('.fa-futbol-o').animate({
left: 0
}, 800, 'easeOutQuart');
}, 660);

var myArray = [];

myArray[0]=2000;
myArray[1]=3000;
myArray[2]=3000;
myArray[3]=4000;
myArray[4]=5000;
for(var k=0;k<5;k++){

if(k==0){
setTimeout(function() {
$('.em-older_woman, .em-man, .em-person_with_blond_hair').animate({
top: 150
}, 800, 'easeOutQuart');
},myArray[0]);
}
else if (k==1){
setTimeout(function() {
//$('.em-thumbsup').css("visibility","visible");
$('.em-thumbsup').css({
top: 30,
visibility: "visible",
transform: "scale(2,2)"

});
},myArray[1]);
}
}