What jQuery Mobile does with forms
Before we get into the code, there are two very important things you should know about what jQuery Mobile will do with your HTML forms. They are as follows:
- All the forms will submit their data via Ajax. This means that the data will be sent directly to the action of your form and the result will be brought back to the user and placed within the page that held the form. This prevents a full page reload.
- All the form fields are automatically enhanced, each in its own way. As we go on in the chapter, you will see examples of this. But basically, jQuery Mobile modifies your form fields to work better on a mobile device. A great example of this is buttons. jQuery Mobile automatically widens and heightens buttons to make them easier to click in the small form factor of a phone. If for some reason, you don't like this, jQuery Mobile provides a way to disable this, either on a global or per-user basis.
- The final point to remember is that because jQuery Mobile...