Reputation: 13651
On my PHP site I use jquery to do little things here and there, but one page in particular uses it heavily.
I get people telling me that "it doesn't work on mobile phones", could this be a case of a code or script issue, or is it just that certain phones don't like jquery scripts?
My site has a sidebar thats refreshed every 10 secs using jquery, no one's ever said that didn't work, its only since I've added this certain page. Im guessing it's a code issue.
Basically Im asking if there's anything I can do about it.
Upvotes: 0
Views: 737
Reputation: 2267
I've recently been building a mobile hybrid app that relies heavily on jquery. Jquery works fine on mobile phones in a broad sense, but there are some specific issues.
Animation:
Animation can be slow and jumpy, but as i discovered last night, you can force GPU hardware acceleration to work with jquery as well as CSS transitions, and the performance improvement is substantial. I accomplished this by using the css style below on all divs and images to force the hardware into thinking it in rendering 3d graphics:
div, img {-webkit-transform:translateZ(0); }
Effect Delay:
When a jquery event is called, such as a button "click", it can take maybe 1 second for the event to happen, depending on what the event is and what is being called into play.
I don't even use jquery mobile, just normal jquery, and besides very minor performance issues that only real nitpickers will complain about, jquery can run perfectly fine. It's just a case of optimizing your code and developing certain coding habits to reduce the load on the processing engine.
Upvotes: 2