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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:38:46+00:00 2026-05-18T12:38:46+00:00

For reference, the thing I need help with is located at: http://www.photographeller.com/portfolio What I’d

  • 0

For reference, the thing I need help with is located at:

http://www.photographeller.com/portfolio

What I’d like to do is when you click a portfolio section to open, before it opens have the images preload, then have the section expand and have the images fade into view, with maybe a loader image while the images are loading or something of that effect. Instead of how it is now, where the section opens and the images load abruptly. Then when the section is clicked closed, have the images fade out. Also if it’s possible, have some easing on the section when it expands, but that’s just me being nit picky.

The jquery code I have in place toggles the class that changes the width of the container of the images. The class applied also changes the display of the main image to none, and changes the display of the other images in the section from none to inline. And another bit of code, as supplied to me in my last question on stack overflow, that takes the combined width of all the images in the section clicked and applies to it’s containing div. Here is the code I have for this effect:

<script type="text/javascript">

$(document).ready(function(){       
$(".boxgrid").click(function () {
$(this).toggleClass("openBoxgrid", 1000);

});

$('div.innerOpen').each(function() {
    var totalImageWidth = 0;

    $("img", this).each(function () {
      totalImageWidth += $(this).width();
    });

    $(this).width(totalImageWidth);
});

});

</script> 

I’ve tried a few things in the .click function for .boxgrid, like .fadeIn() on all images with the class of hidden, but it doesn’t really work the way I’d like. And it also causes ALL images in every section with that class to appear, and not just the section that is clicked on.

Well, I apologize for the lengthy question. Any help on this would be greatly appreciated. Thank you!

  • 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-18T12:38:47+00:00Added an answer on May 18, 2026 at 12:38 pm

    The current problem is that you change the width before you fade in the images.

    This starts to execute but it takes one second

    $(this).toggleClass("openBoxgrid", 1000);
    

    Mean while you change the width and that’s instantaneous. Probably a better effect will be to have a div of the size of the first image, then a div the size of al the images inside.

    Then animate to the with of the first to the size of the other, it will a smother effect.

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

Sidebar

Related Questions

I'm unable to reference certain types in a separate assembly. The strange thing is
Using a reference from... http://weblogs.asp.net/pwelter34/archive/2006/05/03/444961.aspx I have a serializable generic dictionary. One thing I
I would like to know how to properly reference an Array Of An Array
I need some help from some linux gurus. I am working on a webapp
Need some help on understanding how to do this; I'm going to be running
I need some help. I'm looking to have a sidebar that toggles when a
I need help getting my head around the difference between my current OOP notion
One thing I've run into a few times is a service class (like a
I am very new to mysql and databases, so I need help here... How
Need some help understanding if I'm on the right track here and exactly what

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.