Figure out next page in pagebeforehide event - jQuery Mobile -


i have app lists number of objects and, having selected 1 allows various facets edited drilling down detail pages. implemented multiple pages in single html file. if model objects cars page hierarchy might this:

  • carlistpage
    • singlecaroverviewpage
      • carenginedetailspage
      • carcolourdetailspage

i'd prompt user save changes car exit singlecaroverviewpage heading back main carlistpage. i've looked @ handling "pagebeforehide" event on singlecaroverviewpage triggers transition forward detail pages. best point hook handler in?

thanks in advance help

i think should -

$('#singlecaroverviewpage').on('pagebeforehide', function(event, data){     if (data.nextpage.attr('id') == 'carlistpage'){         // handle stuffs here     } }); 

you -

$('#singlecaroverviewpage').on('pagebeforechange', function(event, data){     if (data.nextpage.attr('id') == 'carlistpage'){         // handle stuffs here     } }); 

i'd use pagebeforehide instead of pagebeforechange in scenario - http://jquerymobile.com/demos/1.2.0/docs/api/events.html


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -