From: Steinar H. Gunderson Date: Sun, 21 Dec 2014 12:32:34 +0000 (+0100) Subject: Remove highlight when we go back to first move. X-Git-Url: https://git.sesse.net/?p=remoteglot-book;a=commitdiff_plain;h=26150eda6eb2024c27bf24d3c6ea0414ae932dd2 Remove highlight when we go back to first move. --- diff --git a/www/js/book.js b/www/js/book.js index c6290f1..ebccd1e 100644 --- a/www/js/book.js +++ b/www/js/book.js @@ -48,11 +48,11 @@ var update = function() { board.position(current_display_fen()); } + $("#board").find('.square-55d63').removeClass('nonuglyhighlight'); if (move_override > 0) { var last_move = history[move_override - 1]; var highlight_from = last_move.from; var highlight_to = last_move.to; - $("#board").find('.square-55d63').removeClass('nonuglyhighlight'); $("#board").find('.square-' + highlight_from).addClass('nonuglyhighlight'); $("#board").find('.square-' + highlight_to).addClass('nonuglyhighlight'); }