2048.html
changeset 159 2709c9ff04f0
parent 155 1f8df90bd338
child 163 87479ae56889
child 165 4579c59e7e6b
equal deleted inserted replaced
158:896cd3541ece 159:2709c9ff04f0
   357 
   357 
   358     var boardDom = document.getElementById("board");
   358     var boardDom = document.getElementById("board");
   359     ui.board = {};
   359     ui.board = {};
   360     ui.board.val2048Dom = document.getElementById('2048');
   360     ui.board.val2048Dom = document.getElementById('2048');
   361     ui.board.val2048Dom.addEventListener("click", function(event) {
   361     ui.board.val2048Dom.addEventListener("click", function(event) {
   362       event.preventDefault(); event.stopPropagation();
   362       event.stopPropagation();
   363       ui.board.update(ui.board.position);
   363       ui.board.update(ui.board.position);
   364       localStorage.val2048 = ui.board.val2048Dom.checked;
   364       localStorage.val2048 = ui.board.val2048Dom.checked;
   365       event.target.blur();
   365       event.target.blur();
   366     }, false);
   366     }, false);
   367     ui.board.val2048 = function(val) {
   367     ui.board.val2048 = function(val) {