Note that there are some explanatory texts on larger screens.

plurals
  1. POPreload multiple images, then have them fade into view with jquery
    primarykey
    data
    text
    <p>For reference, the thing I need help with is located at:</p> <p><a href="http://www.photographeller.com/portfolio" rel="nofollow">http://www.photographeller.com/portfolio</a></p> <p>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. </p> <p>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:</p> <pre><code>&lt;script type="text/javascript"&gt; $(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); }); }); &lt;/script&gt; </code></pre> <p>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.</p> <p>Well, I apologize for the lengthy question. Any help on this would be greatly appreciated. Thank you!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload