Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8613189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:48:42+00:00 2026-06-12T04:48:42+00:00

I am using the jQuery Booklet Plugin and have a booklet that works great.

  • 0

I am using the jQuery Booklet Plugin and have a booklet that works great. However I have one hangup. The booklet is fairly large and has many images (about 50) and the first time you visit the page it is slow to load. What I would like to do is take the script I currently have and load the first 20 images (roughly) then show the booklet while the rest of the images load in the background. Here is the script I am using and would like to modify it:

JS

$(function() {
  var $mybook       = $('#mybook');
  var $bttn_next        = $('#next_page_button');
  var $bttn_prev        = $('#prev_page_button');
  var $loading      = $('#loading');
  var $mybook_images    = $mybook.find('img');
  var cnt_images        = $mybook_images.length;
  var loaded            = 0;
  //preload all the images in the book,
  //and then call the booklet plugin

  $mybook_images.each(function(){
    var $img    = $(this);
    var source  = $img.attr('src');
    $('<img/>').load(function(){
      ++loaded;
      if(loaded == cnt_images){
        $loading.hide();
        $bttn_next.show();
        $bttn_prev.show();
        $mybook.show().booklet({
         //Booklet Options
        });
      }
    }).attr('src',source);
  });

});

How would I modify this code to load the first 20 images and then show the booklet? Please provide examples.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T04:48:43+00:00Added an answer on June 12, 2026 at 4:48 am

    I’d need to see the HTML to know for certain, but changing the line that defines cnt_images should do the trick. Change this line:

    var cnt_images = $mybook_images.length;

    To say this:

    var cnt_images = 20;

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using jQuery validation plugin but it has no CSV validation. I have made an
Using jQuery version 1.4.2 and Validation plugin version 1.8.1 I have a textbox that
Using jQuery, how can I get the input element that has the caret's (cursor's)
I am attempting to create a flipbook using jQuery Booklet plugin. I am following
Using jQuery UI , I have a tabs plugin and within tab 1 gets
Using jQuery the jquery plugin along with the easing plugin. I have a series
using jquery's .post i send do my php code an object that with var_dump
Using Jquery , I have an array result [<a href=><img src=image1></a>,<a href=><img src=image2></a>] if
Using jQuery Autocomplete, according to the docs you have to do the following to
Using jQuery Ajax to fetch data from local server: it works well with IE8

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.