I have some problem with a touchend event on iOS:
var target;
window.addEvent('domready', function(){
target = $('mydiv');
target.addEvents({ 'touchstart': onTouchStart });
});
function onTouchStart(){
console.log('touch start');
target.addEvents({ 'touchend': onTouchEnd });
}
function onTouchEnd(){
console.log('touch end');
}
Everything should work fine, but touchend is not fired when I'm on this div. This div is nothing special, it's just a wrapper for some images and has this CSS:
#albums-wrapper{ position: absolute; width: 10000px; height: 100%; }
In this line
target.addEvents({ 'touchend': onTouchEnd });
target is undefined, I believe