-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclick.html
More file actions
38 lines (38 loc) · 1.63 KB
/
click.html
File metadata and controls
38 lines (38 loc) · 1.63 KB
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
34
35
36
37
38
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sno - Clicks</title>
<link rel="icon" type="image/x-icon" href="https://avatars.githubusercontent.com/u/149719209?s=200&v=4"/>
<link rel="stylesheet" href="./style.css">
</head>
<body data="{text:'Hello!'}">
<div incl="sidebar.html"></div>
<div class="main">
<br/><br/><h1>Clicks</h1>
<span class="hr"></span>
Clicks in Sno are very easy. They rest on the backbone of the onclick attribute already provided.<br/>
Sno only provides a simple way to modify variables right inside the onclick tag.
<p class="code">
<body data="{text:'Hello!'}"><br/>
<button onclick="$('text = `Goodbye!`')">Leave</button><br/>
<p react>{{text}}</p><br/>
</body>
</p>
<p class="code">
<button class="betterButton" onclick="$('text=`Goodbye!`')">Leave</button>
<span react>{{text}}</span>
</p><br/>
<h2>The Breakdown</h2>
<span class="hr"></span>
Click statements were originally a seperate attribute, but this failed on older devices.<br/>
The new function method provides a simple way to interact to variables.
<br/><br/>
Congrats, you now know <b>click statements</b>!
<br/>
<br/>
<a href="./ifelse.html">[Prev]</a> <a href="">[Next]</a>
<script src='https://snojs.github.io/sno/crystal.js'></script>
</div>
</body>