This repository has been archived by the owner on Dec 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
slide_04.html
executable file
·47 lines (43 loc) · 1.63 KB
/
slide_04.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
47
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link href="./images/favicon.ico" rel="shortcut icon">
<link href="css/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="javaScript/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="javaScript/main.js"></script>
</head>
<body>
<header>
<h1>Acessing the Canvas Tag with JQuery</h1>
</header>
<div style="height:8px;" class="blackLine"></div>
<section class="code">
<pre>
<canvas width="600px" height="300px" id="myCanvas">
your browser does not support canvas tag jackleg!
</canvas>
<span class="highlight"><script type="text/javascript">
$(window).load(animationExampleInit);
function <span class="function">animationExampleInit</span>(e){
//This API is implemented using the CanvasRenderingContext2D interface
canvasContext = $("#myCanvas")[0].getContext("2d");
}
</script></span>
</pre>
</section>
<canvas width="600px" height="300px" id="myCanvas">your browser does not support canvas tag jackleg!</canvas>
<script type="text/javascript">
$(window).load(animationExampleInit);
function animationExampleInit(e){
canvasContext = $("#myCanvas")[0].getContext("2d");
}
</script>
<nav>
<a id="left_btn" href="slide_03.html">Previous</a>
<a id="right_btn" href="slide_05.html">Next</a>
</nav>
</body>