File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 22< html lang ="en ">
33< head >
44 < meta charset ="UTF-8 ">
5- < title > Sudoku - Backtracking Algorithm Visualizer</ title >
5+ < title > Sudoku - Backtracking Algorithm Visualizer-1.0.0-Beta </ title >
66 < script src ="/jquery.js "> </ script >
77 < script src ="/eel.js "> </ script >
88 < script src ="/script.js "> </ script >
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ function handle_key(event) {
2525 col = col < 0 ? 0 : col
2626 curren_active_cell = ( row ) * 9 + ( col )
2727 $ ( "#" + curren_active_cell ) . click ( )
28- $ ( "#" + curren_active_cell ) . focus ( )
29- $ ( "[data-id=" + curren_active_cell + "]" ) . focus ( )
28+ // $("#" + curren_active_cell).focus()
29+ // cell_rules(document.getElementById(curren_active_cell) )
3030 console . log ( row + " " + col )
3131 }
3232}
@@ -84,14 +84,16 @@ function sanitize(element) {
8484
8585// validating cell for valid entry
8686function cell_rules ( element ) {
87+ console . log ( "test" )
8788 var e = $ ( element )
8889 curren_active_cell = parseInt ( e . attr ( "id" ) )
8990 $ ( ".cell" ) . removeClass ( "active" )
9091 $ ( ".cell" ) . removeClass ( "cell_rules" )
9192 $ ( ".grid" ) . removeClass ( "cell_rules" )
92- var temp = e . val ( )
93- e . val ( "" )
94- e . val ( temp )
93+ $ ( "[data-id=" + curren_active_cell + "]" ) . focus ( )
94+ var temp = $ ( "[data-id=" + curren_active_cell + "]" ) . val ( )
95+ $ ( "[data-id=" + curren_active_cell + "]" ) . val ( "" )
96+ $ ( "[data-id=" + curren_active_cell + "]" ) . val ( temp )
9597
9698 var row = ~ ~ ( parseInt ( e . attr ( "id" ) ) / 9 )
9799 var col = ~ ~ ( parseInt ( e . attr ( "id" ) ) % 9 )
You can’t perform that action at this time.
0 commit comments