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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:07:52+00:00 2026-05-31T04:07:52+00:00

I have objects I am loading in with XML and jQuery and trying to

  • 0

I have objects I am loading in with XML and jQuery and trying to hook on to Isotope, but is seems it’s a no go. Is this possible? I’ve tried many different solutions but can’t seem to find one that works. This is what I have. I’ve tried a callback function in isotope, but still no luck.. I am calling in my class with the XML and the result is this in firebug: item yellow, item red, item blue, etc.

    var $container = $('#container');
    var $checkboxes = $('#filters a');

    $container.isotope({
    itemSelector: '.item',
    transformsEnabled: false,
    animationOptions: {
    duration: 4000,
    easing: 'easeInOutQuad',
    queue: false,
    complete: complete()
    }
    });


    function complete(){
           $.get('sites.xml', function (d) {

    $(d).find('site').each(function () {
        // var id = $(this).attr('id');
        var imageUrl = $(this).find('imgurl').text();
        var title = $(this).find('title').text();
        var url = $(this).find('url').text();
        var brief = $(this).find('brief').text();
        var long = $(this).find('long').text();
        var classa = $(this).find('_class').text();

    $('<div class="' + classa + '"></div>').html('<a href="' + url + '"> 
        <img  src="' + imageUrl + '" class="thumbnail" />' + '<h1>' + title + '</h1> 
        </a>').appendTo('#container');

        });

     });

        }
  • 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-31T04:07:53+00:00Added an answer on May 31, 2026 at 4:07 am

    looks like you are adding your elements to the container after the animation is completed.
    I think it has to be the other way around:
    on page ready:

    • do your ajax
    • in the success-callback add the elements to the DOM
    • then initialize isotope (last step in the ajax-success)

    edit:
    to your question in the comment:
    I’m not sure if I understand what your asking for.
    Since there is no jsfiddle or something I had to make sum assumptions:

    • your container is empty
    • you load some xml, parse it and generate elements you want to have in isotope
    • your code looks like you initialize isotope on an empty container – then add elements.

    my solution:

    var $container = $('#container');
    var $checkboxes = $('#filters a');
    
    init();
    
    function init(){
        $.get('sites.xml', function (d) {
    
            $(d).find('site').each(function () {
                var imageUrl = $(this).find('imgurl').text();
                var title = $(this).find('title').text();
                var url = $(this).find('url').text();
                var brief = $(this).find('brief').text();
                var long = $(this).find('long').text();
                var classa = $(this).find('_class').text();
    
                $('<div class="' + classa + '"></div>').html('<a href="' + url + '"> 
                <img  src="' + imageUrl + '" class="thumbnail" />' + '<h1>' + title + '</h1> 
                </a>').appendTo('#container');
    
                }); // end each
    
            initIsotop(); // after adding all elements - init isotop
        }); // end $.get
    }
    
    function initIsotop() {
        $container.isotope({
            itemSelector: '.item',
            transformsEnabled: false,    
            animationOptions: {
                duration: 4000,
                easing: 'easeInOutQuad',
                queue: false
            }
        });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This might not be possible but I am trying to create a constructor that
I have objects with many variables that I declare and explain in the comments.
I have objects which create other child objects within their constructors, passing 'this' so
I know with OO Perl I can have objects and inheritance, but are interfaces
What I am trying to do is load in objects from an XML save
I have tried and failed to find out how to get the entire XML
I'm trying to load a tree of objects via XML serialisation, and at the
I have trouble loading an xml file stored on my local network... (you could
I have the code below loading into a jquery mobile page data-role. Two strange
I have a tableview contains xml parsed objects. I want to implement activity indicator

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.