IsTouch: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<jsxgraph width="200" height="200">
<jsxgraph width="500" height="500">
var board = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-4,4,4,-4], keepaspectratio:true});
var board = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-4,4,4,-4], keepaspectratio:true});
board.create('text', [-2, 0, 'Is Touch? ' + (JXG.isAndroid() || JXG.isApple()).toString()]);
var t = board.create('text', [-3.8, 3.6, 'Is Touch? ' + (JXG.isAndroid() || JXG.isApple()).toString()]);
 
for (var i in window.Event) {
    t.rendNode.innerHTML += ', ' + i;
}
 
t.rendNode.innerHTML += '<br /><br />is ontouchstart in document.documentElement? ' + ('ontouchstart' in document.documentElement);
</jsxgraph>
</jsxgraph>

Latest revision as of 10:35, 29 October 2012