We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 355960e commit 84eb755Copy full SHA for 84eb755
index.html
@@ -3,20 +3,6 @@
3
<head>
4
5
<script src='https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.4/socket.io.js'></script>
6
-
7
- <script>
8
9
- var socket = io();
10
11
- socket.on('data', function(data) {
12
13
- console.log(data);
14
15
- document.getElementById('sample').style.opacity = data+"%";
16
17
- });
18
19
- </script>
20
21
<style>
22
@@ -35,5 +21,19 @@ <h1>Communicating from an Arduino to Node.js</h1>
35
36
<div id="sample"></div>
37
23
24
+ <script>
25
+
26
+ var socket = io();
27
28
+ socket.on('data', function(data) {
29
30
+ console.log(data);
31
32
+ document.getElementById('sample').style.opacity = data+"%";
33
34
+ });
+ </script>
38
</body>
39
</html>
0 commit comments