examples/page-content-flip/page-content.js
function (name, data) {
            switch (name) {
                case 'ready':
                    // $pages won't be available until the 'ready' message is broadcas
                    var viewerConfig = scope.getConfig();
                    $pages = viewerConfig.$pages;
                    $viewport = viewerConfig.$viewport;
                    $viewport.on('mousedown', handleMousedown);
                    break;
                case 'pageload':
                    if ($pages.eq(data.page - 1).find('.page-content').length === 0) {
                        insertContent(data.page);
                    }
                    break;
            }
        }
function (name, data) {
            switch (name) {
                case 'ready':
                    // $pages won't be available until the 'ready' message is broadcas
                    var viewerConfig = scope.getConfig();
                    $pages = viewerConfig.$pages;
                    $viewport = viewerConfig.$viewport;
                    $viewport.on('mousedown', handleMousedown);
                    break;
                case 'pageload':
                    if ($pages.eq(data.page - 1).find('.page-content').length === 0) {
                        insertContent(data.page);
                    }
                    break;
            }
        }
function ( name , data ) { switch ( name ) { case 'ready' : // $pages won't be available until the 'ready' message is broadcas var viewerConfig = scope . getConfig ( ) ; $pages = viewerConfig . $pages ; $viewport = viewerConfig . $viewport ; $viewport . on ( 'mousedown' , handleMousedown ) ; break ; case 'pageload' : if ( $pages . eq ( data . page - 1 ) . find ( '.page-content' ) . length === 0 ) { insertContent ( data . page ) ; } break ; } }
insert content into each page as it loads
insert content into each page as it loads