My Experience with jQuery Mobile so far...

My Experience with jQuery Mobile so far...

Hi everyone!

After spending hours and hours studding and implementing an app with jQuery Mobile, I can say it's a great framework to standardize the user interface to several mobile platforms.

Although it's not perfect, having some issues to bypass, it's possible to develop great apps with it.

In Brazil we have this sort of saying: "If giving an advice was a good thing, we wouldn't give it, we would sell it."

This being said, I have some pieces of advice to give for those who wanna learn jQuery Mobile:

- First of all, read this post: https://forum.jquery.com/topic/how-to-ask-for-jquery-mobile-help
The jQuery Mobile's learning curve was abrupt to me, but the above link helped to learn the important concepts. It's a lot to read, but it worth it.

- As development environment, I used Notepad++ & Firefox & Firebug to develop and debug the app. It helps to have a preview of what you'll get on the phone.

- Organize your pages in separated files. It helps to develop your pages visually before you put it all together.

- If you are gonna use Phonegap, put your Phonegap script in index.html, inside <head> tag, and call it's methods from other pages when you need it.

- Using fixed headers and footers, at least on android, we get white screen flashes. The only thing that fixed it was the following index.html meta tag:

  1. <meta name="viewport" content="width=device-width, user-scalable=no" />

- There is a known issue called blinking, flickering, etc., related to native WebView scrolling. A good way to bypass it is using iScroll + iScrollView.

- I had another problem on android that was the screen moving 1 pixel down after page transitions. What I did to solve it was the following code in every jQuery Mobile page:

  1. $(document).on("pageinit", ".pageSelector", function(){
  2.     var $page = $(this);
  3.     $page.css("top", "-1px");
  4. });

I hope it help anyone to solve it's own issues. Any further comments will be welcome