Welcome to jQM, unlike jQuery, you no longer use $(document).ready for starters ( http://jquerymobile.com/test/docs/api/events.html ), now you are listening to pageinit and pageshow , probably , your problem is that your JS runs after jQM starts pageshow , which starts right after pageinit
pageshow restarts on going to the page, so it works when you return
When jQM starts pageshow , when it goes through and applies any CSS that you use from its API. But when it got fired, you haven't added elements yet, so they haven't gotten jQM style.
If items are added after an asynchronous call, you also need to manually call .listview('refresh') .
I also have an older answer in which I outline how I organized JS in order to be easy to understand / debug in a multi-page environment how to organize jQM JS ur
You also use a single page template if welcomePage and cardsListPage are in the same file.
A multi-page template is when you have each of these pages in a separate file, which, in my opinion, is better since you load less data at the beginning if you are concerned about performance. But you need to follow the JS setup that I have in my link or your own home solution, but you are basically trying to download all your JS, no matter which page you start from. And handle for each pageinit/pageshow and have a way to determine which page of your multi-page page templates is on.
You use ids , but it doesnโt work well, because in a multi-page template, jQM can load any page more than once (in one DOM, check the debugger to see - provided that domCaching is enabled), well, I think you still know on which page this will check .attr('id') , but this is misleading, since if you made $('#cardsListPage') , you can get one of many elements.
Hope this helps you get started.