Link Details

Link 884257 thumbnail
User 551991 avatar

By macosxnerd101
via dreamincode.net
Published: Nov 29 2012 / 10:31

To make it look right I create such a table in a HTML file and apply CSS so that it looks right. I won’t go into detail which CSS to choose and why, because that’s not the objective of this tutorial. Then I delete the table HTML code. ... wait ... what? Yes. I delete the hardcoded table because I am creating a Javascript game. Should a user (agent) that does not run JS load the page, the user should not be presented with false information (there is a 3x3 grid, it says TTT, so I can play). That may be different if the HTML layout is too complex to be generated by JS. A simple table like that definitely isn’t. The hardcoded table is just for ease of finding out fitting CSS rules. And of course there is another reason, midways in the Model chapter I said I numbered the fields. That is to be done somewhere [6] and where if not in JS itself?
  • 7
  • 0
  • 393
  • 575

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Apache Hadoop
Written by: Piotr Krewski
Featured Refcardz: Top Refcardz:
  1. Play
  2. Akka
  3. Design Patterns
  4. OO JS
  5. Cont. Delivery
  1. Play
  2. Java Performance
  3. Akka
  4. REST
  5. Java