Hello, I am trying to get a random cell in jquery, between 1-16, I have the random number code in Javascript. Now what I want to do is to use that random number, and make the pointer of the table go to that random number? How would this be accomplished. Here is my random number code.
Math.floor(Math.random() * 16)
<table id="board" border="3" bgcolor="black" align="center">
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
<input type="button" value="Shuffle" onclick="shuffle()"/>
</body>
</html>
What I actually should have said is reference, I want to get a reference to a random cell by using the random generator code in javascript
$('board tr td')
That should give me some way of entry in the table