diff --git a/docs/pages/page-scripting.html b/docs/pages/page-scripting.html index 4d3f93df..6de26a8a 100644 --- a/docs/pages/page-scripting.html +++ b/docs/pages/page-scripting.html @@ -40,7 +40,7 @@

The pagecreate event is triggered on a page when it is initialized, right after initialization occurs. Most of jQuery Mobile's official widgets auto-initialize themselves based on this event, and you can set up your code to do the same.


-$( document ).delegate( "pagecreate", "#aboutPage", function() {
+$( document ).delegate("#aboutPage", "pagecreate", function() {
   alert('A page with an ID of "aboutPage" was just created by jQuery Mobile!');
 });
 
@@ -48,7 +48,7 @@ $( document ).delegate( "pagecreate", "#aboutPage", function() {

If you'd like to manipulate a page's contents before the pagecreate event fires and widgets are auto-initialized, you can instead bind to the pagebeforecreate event:


-$( document ).delegate( "pagebeforecreate", "#aboutPage", function() {
+$( document ).delegate("#aboutPage", "pagebeforecreate", function() {
   alert('A page with an ID of "aboutPage" is about to be created by jQuery Mobile!');
 });