Debian Codegraph @

examples/checkbox.html

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 <html>
2 <head>
3 <title>JSXGraph example</title>
4 <link rel="stylesheet" type="text/css" href="../distrib/jsxgraph.css" />
5 <script type="text/javascript" src="prototype.js"></script>
6 <script type="text/javascript" src="../distrib/jsxgraphcore.js"></script>
7 </head>
8 <body>
9 <h2>Checkbox example</h2>
10 <div id="jxgbox" class="jxgbox" style="width:700px; height:500px;"></div>
11 <div id="debug" style="display:none;"></div>
12 <script type="text/javascript">
13 /* <![CDATA[ */
14
15 board = JXG.JSXGraph.initBoard('jxgbox', {originX: 50, originY: 250, unitX: 600, unitY: 200});
16 b1axisx = board.create('axis', [[0,0], [1,0]], {});
17 b1axisy = board.create('axis', [[0,0], [0,1]], {});
18
19 var checkbox = board.create('checkbox', [0.25, 0.5, 'Change Y'], {});
20
21 var p = board.create('point', [
22 function(){ return 0.5;}, // X-coordinate
23 function() {
24 y = 0.5;
25 if (checkbox.Value()) {
26 y += 0.5;
27 }
28 return y;
29 }]);
30 /* ]]> */
31 </script>
32 </body>
33 </html>