jQuery Mobile listview()/listview("refresh")

jQuery Mobile listview()/listview("refresh")

I have a couple of questions surrounding the (rather abstract) title of this thread. My first one is with regards to the listview()/listview("refresh") method.

Our jQuery Mobile application (running within PhoneGap in a native iOS/Android app) is heavily data driven and so it means that the DOM commonly changes. I am confused with when a listview (technically, a UL which is then styled into a listview) is actually initialised by jQuery? If I have some markup with multiple pages within one HTML document, I will sometimes call .listview("refresh") on a listview on a page which is not in view upon the initial page load (i.e. a listview is on a different data-role="page" div which isn't the one shown on pageload).

When I'm building my pages from the code with the data received, I call .listview("refresh") on a page and I receive an error stating something along the lines of "could not define 'undefined' on 'jQuery<some-long-number>'. So my primary question is, when is a listview initialised and is there a document I can read which would explain this because I'm worried my .listview()/.listview("refresh") calls will either break my code and stop execution, or not initialise my listview and so it is not styled.

Sorry for the long-winded post - I hope someone can explain to me as it's confusing me at the moment!

Thanks