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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:20:42+00:00 2026-06-07T05:20:42+00:00

I am using jquery masonry on a wordpress theme I am working on. After

  • 0

I am using jquery masonry on a wordpress theme I am working on. After struggling with getting it to work for a while I found that this:

        <script type="text/javascript">
        jQuery(function () { 
          jQuery('#masonry-wrap').masonry({ 
           itemSelector: '.masonry-box', 
           columnWidth: 283 
          }); 
        })
        </script>

Seems to be working fine for me… However checking the site in Chrome and Safari pushes the bottom of the containing elements into the following elements…

Now I read somewhere, that this can be solved by using the imagesLoaded plugin and the code for that I found here: http://masonry.desandro.com/demos/images.html – however since I am absolutely terrible with jQuery, I’m having a little difficulty getting it to work.

Could anyone help me incorporate it into the code I am already using and that works (the one above)?

Any help would be greatly appreciated!! Julian

  • 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-07T05:20:44+00:00Added an answer on June 7, 2026 at 5:20 am

    I think this should work for you;

    // Masonry Trigger
    var $container = jQuery('#masonry-wrap');
    
    $container.imagesLoaded( function(){
       $container.masonry({ 
         itemSelector: '.masonry-box', 
         columnWidth: 283 
       }); 
    })
    

    Remember to use the latest version of imagesLoaded, I had a problem a while back and the reason was my version was slightly out of date.

    EDIT

    That said, I only use imagesLoaded when I’ve loaded in new content via AJAX and am using the reLayout method. If you run masonry on $window.load() after the images are loaded it should run fine too.

    (function($){
    
        $(window).load(function() {
    
          // Masonry Trigger
          var $container = $('#masonry-wrap');
    
          $container.masonry({
             // options
             itemSelector: '.masonry-box', 
             columnWidth: 283 
          });
    
        }); 
    
    })(jQuery);         
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this site that is built using the jQuery Masonry plugin, the site
I am using jQuery Masonry script. When loading the page first time everything is
I have a fluid width theme and I am using jQuery Masonry and Infinite
I'm using jquery masonry and having trouble getting images/posts to stack properly (see attached
I am creating this custom theme www.designislikethis.tumblr.com , which uses the jQuery Masonry and
I'm working working on Responsive Layout where I'm using JQuery Masonry as well. I'm
I am working on a project that uses the jQuery Masonry and Infinite Scroll
I've been using JQuery masonry and now I'm adding infinite scroll. There are images
I am using both JQuery Masonry and Twitter bootstrap together but experiencing a few
Using jQuery timepickr: http://archive.plugins.jquery.com/project/jquery-timepickr Having included these files: jquery-1.7.1.min.js jquery-ui-1.8.21.custom.min.js ui.timepickr.js And getting this

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.