Skip to content

Instantly share code, notes, and snippets.

@tice0-2
Created November 13, 2018 02:27
Show Gist options
  • Save tice0-2/c3e48d7b7a8ea2128ccde7712f1c2170 to your computer and use it in GitHub Desktop.
Save tice0-2/c3e48d7b7a8ea2128ccde7712f1c2170 to your computer and use it in GitHub Desktop.
var i, j, field;
var cols = parseInt($('#col').val());
var rows = parseInt($('#row').val());
for (i = 0; i < rows; i ++) {
$('<div class=row></div>').appendTo('.board');
for (j = 0; j < cols; j ++) {
field = $('<div class="field hidden"></div>').appendTo('.row');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment