JSFiddle - React, Tailwind, and code Playground
by anshul
HTML
<script src="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraphcore.js"></script>
<link rel="stylesheet" href="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraph.css">
<div id="jxgbox"></div>
CSS
#jxgbox {
width: 500px;
height: 500px;
}
JavaScript
var board = JXG.JSXGraph.initBoard('jxgbox', {
boundingbox: [-5, 5, 5, -5],
axis: false,
grid: true
});
var p = board.create('text', [1, 1, 'NO']);
var t = board.create('text', [-1, 1, 'Test']);
var y = board.create('text', [2, 2, function () {
return "The new text is " + p.plaintext + ' ' + t.plaintext;
}]);
p.setText('go');
board.update();