cancel
Showing results for 
Search instead for 
Did you mean: 

sprint htc hero (1.5) javascript touch event question

Highlighted
Journeyman

sprint htc hero (1.5) javascript touch event question

Hi,

I'm trying to add a javascript which can listen to the 'finger scrolling' event on HTC hero's default browser.

Which event(s) should my listeners bind to?
On iPhone's safari browser I can bind to 'touchmove', 'touchend', or 'scroll' event. But on HTC hero the browser DOES NOT ALWAYS fired these events (although occasionally it does).

I tested it with this script:

document.addEventListener('touchend',end1,false);
document.addEventListener('touchmove',move1,false)  ;
document.addEventListener('touchcancel',cancel1,fa  lse);
document.addEventListener('scroll',scroll1,false);
function cancel1(event) {
alert("cancel");
}
function move1(event) {
alert("move");
}
function end1(event) {
alert("end");
}
function scroll1(event) {
alert("scroll");
}

I also tried jQuery way, like: $(document).bind("touchmove", touchmove1);
it doesn't make any differences.

Here's the browser info:
webkit:true
version:528.5
safari:true

Thanks in advance for your help,
Su
Tip this Post to Staff
su301 is online now Report Post 
Edit/Delete Message
2 REPLIES 2
Wizard

Re: sprint htc hero (1.5) javascript touch event question

you might want to post this question also over to the Sprint ADP forum:

Journeyman

Re: sprint htc hero (1.5) javascript touch event question

thanks for your information.

Community News

Sprint S.M.A.R.T Agents
Sprint S.M.A.R.T Agent are here to help Monday through Friday 6:00 AM CT - 6:00 PM CT. If you need to speak to an agent outside of these hours, please visit Sprint Chat