Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript Events are not working in Tablet-pc?

I have developed a web application in asp.net 3.5. It is consuming lot of javascript/JQuery events and working properly in normal browser in pc, but my client is saying that these are not working in tablet-pc/android and IPad . Like I have a dropdownlist in which I am firing keypress and mouse click events in javascript, and these are perfectly working in normal browsers, I need to be in working form all these in IPads and android tablet-pcs.

like image 939
Bilal lilla Avatar asked Jan 20 '12 09:01

Bilal lilla


1 Answers

The click events won't work on the iPad as it is touch screen - click vs touch I guess. Have you considered using JQueryMobile rather than JQuery? I is optimised for touch devices - as it states on the very front page of the site.

Rather than using click it has a whole host of events you can hook into i.e. tap, swipe, taphold etc... It would be easy enough to hook the same function into a click and a tap event i.e.

('myelement').bind('click', function(event){
   myClickFunction();   
});

('myelement').bind('tap', function(event){
   myClickFunction();   
});

There are possibly (almost certainly) more elegant ways to do this - but that's just a start really.

like image 108
Crab Bucket Avatar answered Nov 02 '22 05:11

Crab Bucket