Swap background images on touch using phonegap?

tr1

New Member
Developing a mobile app with phonegap, i'm facing a small problem. When the touch presses any of my buttons I want to swap the background during the touch so I can give the user a visual feedback of what's going on.But the onmousedown event is never fired in android, or any of the other events, except for onclick and onmouseup? How can I achieve that?I have my javascript method to swap backgrounds that works. \[code\]function touched(isTouched){ console.log(isTouched); if (isTouched) { $('.blue_cell.firstCell').css("background-image", "url(images/cells/list-cell.png)"); } else { $('.blue_cell.firstCell').css("background-image", "url(images/cells/blue-cell.png)"); } }\[/code\]And I have my test button with the events I tried using:\[code\]<div class='blue_cell firstCell' onmouseup="touched(false)" onmousedown="touched(true)" onmouseover="touched(true)" onfocusin="touched(true)"> <div class='cellMainText'>openPopOver()</div> <div class='cellIconText'>POP</div></div>\[/code\]Thanks
 
Back
Top