Note that there are some explanatory texts on larger screens.

plurals
  1. POjquery mobile and three.js make document load twice
    primarykey
    data
    text
    <p>I'm fooling around with jquery mobile and three.js.</p> <p>Here is my code</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt; &lt;meta name="format-detection" content="telephone=no" /&gt; &lt;meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /&gt; &lt;title&gt;Hello World&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;script src="js/jquery-1.8.3.min.js"&gt;&lt;/script&gt; &lt;script src="js/jquery.mobile-1.2.0.js"&gt;&lt;/script&gt; &lt;script src="js/three.min.js"&gt;&lt;/script&gt; &lt;script&gt; var camera, scene, renderer; var geometry, material, mesh; init(); animate(); function init() { camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 1, 10000 ); camera.position.z = 1000; scene = new THREE.Scene(); geometry = new THREE.CubeGeometry( 200, 200, 200 ); material = new THREE.MeshBasicMaterial( { color: 0xff0000, wireframe: true } ); mesh = new THREE.Mesh( geometry, material ); scene.add( mesh ); renderer = new THREE.CanvasRenderer(); renderer.setSize( window.innerWidth, window.innerHeight ); document.body.appendChild( renderer.domElement ); $(document).live("vclick", function (evt) { alert('list click'); }); } function animate() { // note: three.js includes requestAnimationFrame shim requestAnimationFrame( animate ); mesh.rotation.x += 0.01; mesh.rotation.y += 0.02; renderer.render( scene, camera ); } &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>It's an example from three.js, which works fine. Although if I include jquery mobile and jquery library, the document loads twice. (there is a rectangle, if you scroll down there is a rotating cube and there is a text "loading" twice on the bottom.)</p> <p>Could someone explain whats going on? I only included the two jquery libraries.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload