0

turn.js を使用してフリップで複数のパラメーターを渡そうとしています。現在のオプションでは、pageNumber のみが規定されています。

それ以外の

function addPage (page, book) {
    //Check if the page is not in the book
    if ( ! book. turn( 'hasPage' , page)) {
        // Create an element for this page
        var element = $ ( '<div />' ). html ( 'Loading…' );
        // Add the page
        book.turn( 'addPage' , element, page);
        // Get the data for this page
        $.ajax ({url : "app?method=get-page-content&page=" + page)
            .done( function (data) { element. html (data); });
    }
}

私が欲しい

function addPage (page, book) {
    // Check if the page is not in the book
    if ( ! book. turn( 'hasPage' , page)) {
        // Create an element for this page
        var element = $ ( '<div />' ). html ( 'Loading…' );
        // Add the page
        book.turn( 'addPage' , element, page, chapter);
        // Get the data for this page
        $.ajax ({url : "app?method=get-page-content&page="+ 
page+ "&currentChapter" + chapter)
            .done( function (data) { element. html (data); });
    }
}

奉仕する章のページを決定できるように。

サンプルコードは大歓迎です。

4

0 に答える 0