<div id="scrollTarget" style="left: 145px;top:300px;position: absolute;"><img id="imageScroll" src="img/scroll.png" height="80" width="80"></img></div>
</div>
<p class="ui-li-desc">* Drag this red button in above eare.</p>
+ <p id="errormessage"></p>
</div>
<div data-role="footer" data-position="fixed">
</div>
//touchmove event
document.getElementById("scrollTarget").addEventListener('touchmove', function (event){
+ var image = $("#imageScroll")[0];
+ image.src = "img/btn_down.png";
var changedTouches = event.changedTouches;
if(changedTouches.item(0).clientX <= getLeft($("#scrollEare")[0])+40){
scrollTarget.style.left = getLeft($("#scrollEare")[0])+"px";
}, false);
//touchend event
+ document.getElementById("scrollTarget").addEventListener('touchcancel', function (event){
+ var image = $("#imageScroll")[0];
+ image.src = "img/scroll.png";
+ }, false);
+
+ document.getElementById("scrollTarget").addEventListener('touchend', function (event){
+ var image = $("#imageScroll")[0];
+ if(image.src.toString().indexOf("scroll.png") == -1){
+ $("#errormessage").html("touchcancel event can not be fired");
+ }
+ }, false);
+
+ //touchend event
document.getElementById("tabletouch").addEventListener('touchend', function (event){
if(step1 && step2 && step3){
EnablePassButton();