1. INCLUDE CSS AND JS FILES
<link type="text/css" rel="stylesheet" href="css/sudoku.css">
<script src="js/jquery-1.10.2.min.js"></script>
<script src="js/jquery.hammer.min.js"></script>
<script src="js/jquery.stopwatch.js"></script>
<script src="js/sudoku.js"></script>
2. HTML
<div id="sudoku2" class="sudoku-wrapper default-theme">...</div>
3. JAVASCRIPT
$('#sudoku2').sudoku({
editable : false,
touch : false,
touchKeyboard : false,
fullscreenMode : false,
showOptions : false
});
4. OPTIONS
var defaults = {
editable : true,
touch : true,
touchKeyboard : true,
fullscreenMode : true,
showOptions : true,
fullscreenEnterText : 'Enter Fullscreen',
fullscreenExitText : 'Exit Fullscreen',
resetText : 'Reset',
pauseText : 'Pause',
unpauseText : 'Unpause',
onComplete : function(){},
onChange : function(){},
onFullscreenEnter : function(){},
onFullscreenExit : function(){},
onPause : function(){},
onUnpause : function(){},
onStart : function(){}
};
5. METHODS
-
readonly: Makes the instance readonly
$(elem).sudoku('readonly');
-
editable: Enables editing capabilities
$(elem).sudoku('editable', true);
-
fullscreen: Enable/Disable fullscreen mode on certain instance
$(elem).sudoku('fullscreen', true);
-
touch: Enable/Disable touch capabilities for the instance
$(elem).sudoku('touch', true);
-
keyboard: Show/Hide the side-keyboard (must be enabled for touch)
$(elem).sudoku('keyboard', true);
-
hideOptions: Hides the options panel
$(elem).sudoku('hideOptions');
-
showOptions: Shows the options panel
$(elem).sudoku('showOptions');
-
pauseGame: Pauses the game
$(elem).sudoku('pauseGame');
-
unpauseGame: Unpauses the game
$(elem).sudoku('unpauseGame');