jQuery Mobile has various events and methods. The pagecontainer
events and methods are used to handle most of the page
events from v1.4
. I do not understand the use of the :mobile-pagecontainer
selector.
The API documentation only uses $('.selector')
which is straightforward and simple to understand though, I do not know which object it is referring to. Am I supposed to use it on a $('div[data-role="page"]')
or on $('body')
. And what does the other selector, :mobile-pagecontainer
, signify?
API: jQuery 1.4.0 API
Edit: Also, I found many examples on stackoverflow and other websites using $(document)
what is the relation to all these?
Edit 2: I created a tiny fiddle which exhibits the pagecontainerbeforeshow
event using all the 3 selectors $('body')
, $(':mobile-pagecontainer')
and $(document)
Fiddle - PageContainer Events. My heart felt gratitude and thanks to @Omar