-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathljQuery-demo.html
46 lines (36 loc) · 1.33 KB
/
ljQuery-demo.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
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html>
<head>
<title> My Super-lightweight jQuery implementatoin</title>
<script type="application/javascript" src="ljQuery.js"> </script>
<script type="application/javascript" >
function runDemo()
{
$_ljquery("greenClass").setStyle("backgroundColor", "green");
$_ljquery("contentChange").setContent("New content + underlined").
setStyle("textDecoration", "underline");
$_ljquery("span").hide();
$_ljquery("showAndColorize").show().setColor("blue").setBackgroundColor("gray");
}
</script>
</head>
<body>
<h1> Lightweight-jQuery framework </h1>
Feel free to view the source code of the framework,
it's pretty simple(~120 lines of code) and straighforward.
<br />
Click <a href="#" onclick="javascript:runDemo()"> HERE </a> to test for yourself!
Click <a href="#" onclick="javascript:location.reload()"> HERE </a> to refresh page!
<hr />
<!-- the demo code itself -->
<p class="greenClass"> This paragraph has class attribute set to "greenClass". <br>
You may be wondering wonder what will happen to it...
</p>
<p id="contentChange"> Old content </p>
<span> all SPANS will be hidden </span> <br />
<span> this SPAN is no exception ;-) </span>
<h2 id="showAndColorize" style="display:none;"> This heading was originally hidden.
It's magic!</h2>
<!-- end of the demo code -->
</body>
</html>