Recently, I was developing a website for the iPhone version and came into use with a jQuery plug-in called jQTouch. This plug-in is specifically designed for iPhone jQuery. However, many problems have been encountered during use, most of which are conflicts with the previous Javascript writing method, which are listed below for reference.
1. You need to use target = "_ webapp" for page Jump to jQTouch. Otherwise, a problem may occur.
2. Someone found a problem on the tap and click websites: I noticed an interesting bug with the JQTouch platform and wanted to know if anyone else has run into it our has a workaround for it. if I have a link with an onclick event and lightly tap the link on the iPhone, the link works, but the click event is not fired. if I tap the same link harder, the event fires. any thoughts on this? The solution is to use tap instead of click. The iOS series will generate a tap event when you touch the link, and a click event is triggered when you touch the link. Of course, you can use this statement to determine the system
Var userAgent = navigator. userAgent. toLowerCase (); var isiPhone = (userAgent. indexOf ('iphone ')! =-1 )? True: false; if (userAgent. indexOf ('ipod ')! =-1) isiPhone = false; // turn off taps for iPod Touches clickEvent = isiPhone? 'Tap': 'click'; $ ('# somelink'). bind (clickEvent, function (){...});
3. jQTouch is incompatible with Ajax. It divides multiple divs on the top layer into multiple pages for display and jumps by the div id. If you use Ajax to refresh the entire div, you will not be able to find the original div id during back. On the one hand, using back will cause errors, on the other hand, when redirecting to a div, the newly acquired page of Ajax will not be marked with class = "current", leading to overlapping display of several pages. It would be nice if the page to be jumped to is long, otherwise it would be a cup ...... If you encounter these problems temporarily, try again!
Source: http://kylinhuang.blog.163.com/blog/static/18259419620101166344177/