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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:29:05+00:00 2026-05-30T03:29:05+00:00

I am using jQuery Masonry script. When loading the page first time everything is

  • 0

I am using jQuery Masonry script. When loading the page first time everything is good, but when I add dynamic content, the script does not reload again.

Here is my code:

    <div id="alpha" class="container clearfix">

        <div class="item"><img src="<?php echo base_url();?>css/images/default.jpg"/><div id="coment"></div></div>
        <div class="item"><img src="<?php echo base_url();?>css/images/default.jpg"/></div>
        <div class="item"><img src="<?php echo base_url();?>css/images/default.jpg"/></div>
        <div class="item"><img src="<?php echo base_url();?>css/images/default.jpg"/></div>
        <div class="item"><img src="<?php echo base_url();?>css/images/default.jpg"/></div>
        <div class="item"><img src="<?php echo base_url();?>css/images/default.jpg"/></div>
        <div class="item"><img src="<?php echo base_url();?>css/images/default.jpg"/></div>

    </div>

    <script src="<?php echo base_url()?>js/jquery.min.js"></script>
    <script src="<?php echo base_url()?>js/jquery-1.7.1.min.js"></script>
    <script src="<?php echo base_url()?>js/jquery.masonry.min.js"></script>

 <script type="text/javascript">

    $(function(){
            var $alpha = $('#alpha');        

            $alpha.masonry({
              itemSelector: '.pin_item',
              columnWidth: 230,
                  //isAnimated: true
            });

        });

  </script>

You can seen the div id="coment" when comment it append comment. The first top item and bottom item look merged. There is no cape between each other.

Can any one help me?

  • 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-30T03:29:07+00:00Added an answer on May 30, 2026 at 3:29 am

    That code doesn’t have a div with the ID "coment" unless I’m just blind. It also doesn’t show how you’re dynamically adding new content. Finally, does pastebin allow execution of code? A live working example would work better; otherwise you could have just pasted your code here instead.

    In short: whatever you’re using to dynamically add content must surely have a callback function. Just fire masonry() again as part of the callback.

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

Sidebar

Related Questions

I'm using jQuery Masonry (google it, it's super awesome) for my site's dynamic layout.
I am using the jquery Masonry plugin and looking to hide all content until
Using jquery how do I focus the first element (edit field, text area, dropdown
Using jQuery, how do I delete all rows in a table except the first?
I am using a jquery plugin called masonry. In IE & firefox, the site
I have a fluid width theme and I am using jQuery Masonry and Infinite
Using jQuery validation plugin but it has no CSV validation. I have made an
Using jQuery how would I find/extract the Spartan string if the outputted HTML page
Using jquery how can one add a black border around all p elements that
Hi I am trying to setup a site using jQuery Masonry and Infinite scroll

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.