forked from lizhineng/word-search-game
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
33 lines (32 loc) · 1.15 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Word search game</title>
<link rel="stylesheet" href="css/wordsearch.min.css" />
<link rel="stylesheet" href="css/style.min.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.min.js"></script>
<script src="js/wordsearch.min.js"></script>
<script type="text/javascript">
var gameAreaEl = document.getElementById('ws-area');
var gameobj = gameAreaEl.wordSearch();
// Put words into `.ws-words`
var words = gameobj.settings.wordsList,
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>