Skip to content

Commit

Permalink
update examples/counter-basic-impure in response to @tonydaly verbal …
Browse files Browse the repository at this point in the history
…feedback!
  • Loading branch information
nelsonic committed May 8, 2017
1 parent e80d4ce commit c4b6db4
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions examples/counter-basic-impure/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@
<!-- CSS Styles are 100% optional. but they make it look *much* nicer -->
<link rel="stylesheet" href="../style.css">
</head>

<body>
<button class='inc' onclick="incr()">+</button>
<div id='count'>0</div>
<button class='dec' onclick="decr()">+</button>
<script>
var el = document.getElementById('count')
function incr() { el.innerHTML = parseInt(el.textContent, 10) + 1 };
function decr() { el.innerHTML = parseInt(el.textContent, 10) - 1 };
</script>
<button class='dec' onclick="decr()">-</button>
<script>
var el = document.getElementById('count')
function incr() { el.innerHTML = parseInt(el.textContent, 10) + 1 };
function decr() { el.innerHTML = parseInt(el.textContent, 10) - 1 };
</script>
</body>
</html>

0 comments on commit c4b6db4

Please sign in to comment.