Point: Difference between revisions
From JSXGraph Wiki
No edit summary |
No edit summary |
||
Line 8: | Line 8: | ||
</script> | </script> | ||
</source> | </source> | ||
The JavaScript code has to be placed AFTER the div element which will contain the construction. | The JavaScript code has to be placed AFTER the div element which will contain the construction. | ||
From now on, we will only show the JavaScript code. | From now on, we will only show the JavaScript code. | ||
Line 20: | Line 19: | ||
var p = board.createElement('point',[1,1]); | var p = board.createElement('point',[1,1]); | ||
</script> | </script> | ||
</html> | |||
[[Category:Examples]] | [[Category:Examples]] |
Revision as of 09:27, 17 September 2008
This example shows how to construct a simple, draggable point. It is produced by the following commands:
<div id="jxgbox" class="jxgbox" style="width:500px; height:200px; float:left; "></div>
<script type="text/javascript">
var board = JXG.JSXGraph.initBoard('jxgbox', {originX: 200, originY: 100, unitX: 50, unitY: 50});
var p = board.createElement('point',[1,1]);
</script>
The JavaScript code has to be placed AFTER the div element which will contain the construction. From now on, we will only show the JavaScript code.