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 3975456
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:41:14+00:00 2026-05-20T04:41:14+00:00

$(#body-background).ezBgResize(); $(#nav).animate({ left: -725px }, 800, easeOutCirc ); $(#page .home).animate({ right: 0px }, 800,

  • 0
$("#body-background").ezBgResize();
$("#nav").animate({
        left: "-725px"
    }, 800, "easeOutCirc" );
    $("#page .home").animate({
            right: "0px"
    }, 800, "easeOutCirc" );

This is essentially my code.

The first line uses jQuery Easy Background Resize: (ref: http://johnpatrickgiven.com/jquery/background-resize/)

In the HTML, you put something like this:

<!-- This gets positioned absolutely so place it anywhere. -->
<div id="body-background"><img src="image/bg.jpg" alt="Bg"></div>

The problem I’m having is that the image takes so long to load the first time, the animations don’t fire…and skip to the end. Anyway I can delay the animation till after the resize is complete?

Thanks in advance.

Edit: The site I’m working on: http://jsc.yondershorecreative.com/

  • 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-05-20T04:41:15+00:00Added an answer on May 20, 2026 at 4:41 am

    Best thing I can do is simulate the image preloader and wait for the load event of it:

    // grab the background image object
    var img = $('#body-background img');
    
    // next, create a new hidden image in the background and bind to the load event
    var nImg = $('<img>').bind('load',function(){
      // this is where your "After load" code would go
    });
    
    // next, give the image the same URL of the image for the background
    // this will force the event to load up and call the load event
    nImg.attr('src',img.attr('src'));
    

    Works in jsFiddle (Just change the number after the ? in the image URL to simulate emptying cache). Let me know if that helps.


    Update (Given commentary below)

    <script type="text/javascript">
      $('#body-background').azBgResize();
    
      var homepageAnimation = function(){
        $("#nav").animate({
          left: "-725px"
        }, 800, "easeOutCirc" );
        $("#page .home").animate({
          right: "0px"
        }, 800, "easeOutCirc" );
      }
      $(window).load(function(){
        setTimeout(homepageAnimation,1000);
      });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

body{ background:#fff url('images/testProfile.jpg') no-repeat right top; } I assume this code should work so
body{ background:#eff3f6; border: 1px solid #C3D4DB; } .content{margin-top:1px; margin-right:200px; margin-left:200px; background:#fefefe;} .box { background:#fefefe;
I am doing this body{ background: -webkit-gradient(linear,left top, left bottom, from(#FAFAFA), to(#D8D8D8)); } <div
I ve applied a background to my page like this, body { background:#FFFFFF url('images/color.png')
I have this background, the css code is: body { background: #FFF url('images/bg.png') no-repeat
This sass snippet: $red: #f00 $lightred: lighten($red, 50%) body background: $lightred Is parsed to:
This code works... $(document).ready(function(){ $('body').css('background','black'); }); but this code doesn't... $(document).ready(function(){ $('thumb_slider').css('background','black'); }); ^^^the
I have a background on a page body that is an image which I
I have this in my CSS file: body {style.css (line 3) background:#CDF8FF url(images/final_bg.jpg) no-repeat
I have a page where the body is set to a background colour. I

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.