Permalink
Browse files

remove strategy cell animation

  • Loading branch information...
1 parent c712bd5 commit 83cc24ac5556ca1de1b11f67299b41b8dc38f63e @jkk committed Nov 19, 2008
Showing with 6 additions and 15 deletions.
  1. +2 −15 index.html
  2. +4 −0 style.css
View
17 index.html
@@ -78,19 +78,6 @@
return html;
}
- function highlightCell(cellId) {
- var cell = $('#cell-' + cellId),
- fromFg = cell.css('color'),
- fromBg = cell.css('backgroundColor'),
- toFg = '#fff',
- toBg = '#f80',
- delay = 150;
- cell.animate({color: toFg, backgroundColor: toBg}, delay)
- .animate({color: fromFg, backgroundColor: fromBg}, delay)
- .animate({color: toFg, backgroundColor: toBg}, delay)
- .addClass('highlighted');
- }
-
function getCardIndex() {
var index;
while (typeof index == 'undefined' || pickedCardIndexes.indexOf(index) != -1)
@@ -103,7 +90,7 @@
pickedCardIndexes = [];
answered = false;
$('#response').html('');
- $('#strategy td.highlighted').css({color: '', backgroundColor: ''}).removeClass('highlighted');
+ $('#strategy td.highlighted').removeClass('highlighted');
cards.dealer = deck[getCardIndex()];
var value;
while (typeof value == 'undefined' || value == 21) {
@@ -149,7 +136,7 @@
$('#response').html("<div class='correct'>Correct</div>");
else
$('#response').html("<div class='wrong'>Wrong</div>");
- highlightCell(upcard + '-' + myhand);
+ $('#cell-' + upcard + '-' + myhand).addClass('highlighted');
answered = true;
}
View
4 style.css
@@ -129,4 +129,8 @@ table#strategy td.D {
table#strategy td.P {
color: #808;
background: #fbf;
+}
+table#strategy td.highlighted {
+ color: #fff;
+ background: #f80;
}

0 comments on commit 83cc24a

Please sign in to comment.