Patterns & Practices when creating a jQM app?

Patterns & Practices when creating a jQM app?

I've been trying to create a webapp with jQuery Mobile 1.4 using only css, html5 and javascript, no other js libraries or serverside code. The documentation is very helpful on how to structure the HTML to get a nice UI but now that I want to make it interactive I'm a bit stuck: I have no idea how I should structure my javascript code. Especially how to integrate the jQM events with my code that keeps the state of the app.

Are there any good articles or books that can help me with that?

I did find some samples of code but most of them are for very old versions of JQM.