Brett starten-leeren

 

 

JavaScript

var board = new ChessBoard('board', {
  draggable: true,
  dropOffBoard: 'trash',
  sparePieces: true
});

$('#startBtn').on('click', board.start);

$('#clearBtn').on('click', board.clear);

HTML

<div id="board" style="width: 400px"></div>
<input type="button" id="startBtn" value="Start" />
<input type="button" id="clearBtn" value="Clear" />