1

I am new to phonegap and despite some googling I haven't really figured out what's the best solution for creating buttons.

I mean, I want a clear indication that the button is pressed when i press it. If my press lasts longer, the button should look like it's "down". I tried using CSS hover and active states but it's not a satisfying result.

Would you recommend using some touch event library or what?

Thanks.

Capuchin
  • 3,465
  • 6
  • 28
  • 40

2 Answers2

1

I found a pleasing solution now. It includes using xui.js touchstart and touchend events. This is what i was looking for.

No reaction from my HTML buttons in phonegap

Community
  • 1
  • 1
Capuchin
  • 3,465
  • 6
  • 28
  • 40
0

Are you using any mobile frameworks like jQuery Mobile/Kendo UI Mobile? They have lots of mobile widgets including buttons. It's gonna be a big pain to create all the touch widgets from scratch.

Nishanth Nair
  • 2,975
  • 2
  • 19
  • 22
  • I prefer creating my own styles, and I wouldn't like to overwrite all this stuff again with my custom styles – Capuchin Mar 05 '13 at 13:41
  • See this thread: http://stackoverflow.com/questions/6063308/touch-css-pseudo-class-or-something-similar . you will have to create your own touch event and then do the animation. – Nishanth Nair Mar 05 '13 at 13:45