# Legacy application transition from jQTouch to jQuery Mobile This page describes why you may need to transit your legacy application from using jQTouch to jQuery Mobile and steps you need to perform. ## Why to use jQuery Mobile? [jQuery Mobile](http://jquerymobile.com/) may be considered as an advanced successor of [jQTouch library](http://jqtouch.com/). At the moment jQuery Mobile have more development progress, provides better support, supports more platforms and performs pretty reliable. Rhodes has been ported to jQuery Mobile and have no jQTouch out of box support anymore. ## Platform Prerequisites Target platform should be [supported by jQuery Mobile framework](http://jquerymobile.com/gbs/). ## Transition steps You need to use [Rhodes application template code](https://github.com/rhomobile/rhodes/tree/master/res/generators/templates/application/) (*rhodes_root_dir/res/generators/templates/application*) as the source of files to copy from. 1. Backup your application as it is before any changes. 2. Copy all content of *public/jquery* directory to the *public/jquery* directory of your application. 3. Copy all content of *public/jqmobile* directory to the *public/jqmobile* directory of your application. 4. Copy all content of *public/css* directory to the *public/css* directory of your application. 5. Copy all content of *public/js* directory to the *public/js* directory of your application. 6. Rename your *app/layout.erb* to some other name, say *app/layout-legacy.erb*. 7. Copy *app/layout.erb* file to the *app* directory of your application. 8. Replace all instances of **'<%%'** symbol combination in the new *app/layout.erb* to the **'<%'** combination. 9. Replace "<%= class_name %>" inside the title tag in the header for the name of your app, ex "My App" 10. Use your *app/layout-legacy.erb* as reference to implement needed customization and styling in the *app/layout.erb* file. 11. Change the HTML structure of all application pages so they will meet jQuery Mobile requirements (see below). ### Application pages structure changes The most notable difference between jQTouch and jQuery Mobile is last one using HTML5 conforming custom *data-something* attributes instead of jQTouch classes. Structure of a page with jQuery Mobile is pretty similar to the jQTouch, but have significant differences. For example no distinct *div* for title and toolbar, everything goes to the common header *div*. For detailed description on how to do advanced jQuery Mobile pages, forms and controls mastering look at [jQuery Mobile documentation](http://jquerymobile.com/) please. Here is just a sample on how to change jQTouch application page to meet jQuery Mobile format. Let you have this jQTouch page code: :::html