You could save one call to .data:
```javascript
if ( typeof $pagetCtx !== 'undefined' ) {
    page = $pagetCtx.data( "mobile-page" );
}
if ( !page ) {
    page = $.mobile.closestPageData( $widgetElements );
}
```