129d128 < var coordsnext=0; 136,138d134 < var restcmd=["", " document.getElementById('bigbutton').style.backgroundColor='pink'; ", " document.getElementById('bigbutton').style.borderColor='1px solid red'; ", " document.getElementById('bigbutton').style.fontSize='14px'; ", " document.getElementById('bigbutton').style.paddingBottom='24px'; "]; < var rest=["", "Button background colour set to pink.", "Button border colour set to red.", "Button font size set to 14px.", "Button padding bottom set to 24px."]; < 479,524d474 < < function addfunctionality(evt) { < < < var iourx=-9, ioury=-9; < var extras=""; < if (document.getElementById('caption').innerHTML == '') { < coordsnext++; < document.getElementById('caption').innerHTML="I'm one big button that now has this caption. Click again and we supply you with (left,top) co-ordinates.
"; < } else { < if (evt.clientX) { < iourx = evt.clientX; // - elemLeft; < ioury = evt.clientY; // - elemLeft; < } else if (!evt.touches) { < iourx = evt.pageX; // - elemLeft; < ioury = evt.pageX; // - elemLeft; < } < if (evt.touches) { < iourx = evt.touches[0].clientX; < ioury = evt.touches[0].clientY; < } < if (iourx >=0 && ioury >= 0) { < extras=""; < if (rest.length > coordsnext && restcmd.length > coordsnext) { < eval(restcmd[coordsnext]); < eval(" extras='' + '" + rest[coordsnext] + "'; "); < } < document.getElementById('coords' + coordsnext).innerHTML="You clicked at (" + iourx + "," + ioury + "). " + extras + "
"; < coordsnext++; < } < } < } < < function mcheck() { < if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { < //document.body.style.height="100%"; < //document.body.style.display="inline-block"; < //document.getElementById("bigbutton").style.height="60%"; < //document.getElementById("bigbutton").style.display="inline-block"; < //document.getElementById("bigdiv").style.display="inline-block"; < //document.getElementById("bigdiv").style.height="100%"; < //document.getElementById("smallerdiv").style.display="inline-block"; < //document.getElementById("smallerdiv").style.height="100%"; < document.body.innerHTML=document.body.innerHTML.split('')[0].replace(document.body.innerHTML.split('>')[0] + '>',''); < } < } 527,530c477,479 < < --- > >