diff options
| author | lizhineng <[email protected]> | 2013-06-29 13:59:23 +0800 |
|---|---|---|
| committer | lizhineng <[email protected]> | 2013-06-29 13:59:23 +0800 |
| commit | 45f3be5425870f9b4cf9a60f2f950fa3dd7807ef (patch) | |
| tree | f5a57377df0c0cf5e7d6628af6db2c974552c38b /index.html | |
| parent | ef5c55619e88600492d6d4015660e7101baafce3 (diff) | |
| download | word-search-game-45f3be5425870f9b4cf9a60f2f950fa3dd7807ef.tar.gz word-search-game-45f3be5425870f9b4cf9a60f2f950fa3dd7807ef.zip | |
Added word list
Diffstat (limited to 'index.html')
| -rw-r--r-- | index.html | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -3,12 +3,14 @@ <head> <meta charset="utf-8"> <title>Word search game</title> + <link rel="stylesheet" href="css/wordseach.css" /> <link rel="stylesheet" href="css/style.css" /> </head> <body> <div class="wrap"> <h1 class="logo">Word search game</h1> <section id="ws-area"></section> + <ul class="ws-words"></ul> </div> <a href="https://github.com/lizhineng/word-search-game"><img style="position: absolute; top: 0; right: 0; border: 0;" src="images/forkme_right_red.png" alt="Fork me on GitHub"></a> <script src="js/utility.js"></script> @@ -16,7 +18,16 @@ <script type="text/javascript"> var gameAreaEl = document.getElementById('ws-area'); var gameobj = gameAreaEl.wordSeach(); - console.log(gameobj.words); + + // Put words into `.ws-words` + var words = gameobj.settings.words, + wordsWrap = document.querySelector('.ws-words'); + for (i in words) { + var liEl = document.createElement('li'); + liEl.setAttribute('class', 'ws-word'); + liEl.innerText = words[i]; + wordsWrap.appendChild(liEl); + } </script> </body> </html>
\ No newline at end of file |
