Over a million developers have joined DZone.

Grid like Board using JQuery

DZone's Guide to

Grid like Board using JQuery

Free Resource
For weekend freinds gathering, I wrote this code to generate various board games like tambola, scrabble etc. 

Following Jquery function 
alternateColorCellBoard(numOfRows, numOfColumns, parameter, color1, color2, cellHeight, cellWidth )
  takes seven parameter numOfRows, numOfColumns, parameter, color1, color2.
The function call be like:
  var myArr = [ "hello1", "hello2", "hello3", "hello4","hello5", "hello6","hello7", "hello8","hello9"];
  $(document).ready(function() {
#chequeredBoard is the div id and is written as <div id="exArr"></div>
  the function will create a 3 by 3 matrix with the data in the array in it.


The HTML ::


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}