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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:23:45+00:00 2026-06-15T18:23:45+00:00

The base fiddle is here for more context. That example shows only three elements

  • 0

The base fiddle is here for more context.

That example shows only three elements but there will be many so I want to use a separate JSON file and automatically populate the <ul> with <li> items.

I used this code to create the HTML in the fiddle along with the JSON below it.

$.getJSON('tdata.json',
    function(data){
      $.each(data.Users, function(i,Users){
      $('#tumblrlist').append("<li class=\"tumblr pbs " + Users.tumblrClass + "\" style=\"width:132px; height: 132px;\" ><div class= \"" + Users.tumblrClass + "\" ><a href=\"/t1.html?t=" + Users.tumblr + "\" rel=\"external\" ><img  src=\"http://api.tumblr.com/v2/blog/" + Users.tumblr + ".tumblr.com/avatar/128/ \" title=\""+ Users.tumblrTitle + "\" alt=\"" + Users.tumblrTitle + "\"></a></div><span class=\"tumblrName\">" + Users.tumblrTitle + "</span></li>");
      });
    });

The external JSON file looks like this (it is well-formed and no problems generating the HTML):

{"Users":[
        {
            "tumblr":"pbstv",
            "tumblrImage":"pbstv",
            "tumblrTitle":"PBS & Tumblr",
            "tumblrClass": "pbs"

        }, ...

The problem is that I am forced to manually create the HTML using this code and paste it into the <ul> for Isotope to operate properly. I have run into various errors including empty <ul>s, 0px height containers, and <li>s that don’t get the proper Isotope markup.

I cannot get this coded after way too many attempts I will confess to. I thought it would be easy enough to get the JSON data, create the elements, and use Isotope.

I’m hoping that you wizards can solve the problem.

  • 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-15T18:23:46+00:00Added an answer on June 15, 2026 at 6:23 pm

    Solved it myself.

    Here’s the solution in case someone else encounters same situation:

        $('#one').live( 'pageinit', function(event){
    
        myNewFunction();
    
        });
    

    myNewFunction needs to include the getJSON stuff plus all of the Isotope stuff.

    NB: The Isotope code needs to be placed after the first }); and before the last }); in the getJSON block.

    Then, everything is wrapped in myNewFunction which resides in a separate file.

    Now, I only need to edit a single JSON file for additions, revisions, and deletions.

    Works nicely.

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

Sidebar

Related Questions

I don't understand why but .parent() is not working on dynamically created elements. Here
Base on this http://jsfiddle.net/kaiser/wzcst/light/ example, but the marker in circle is not accurate, when
// Base Class class Base { public: void RegisterWithServer(); // some more functions protected:
My base class has properties that are used by a subclass. where should Release
MY base table have two colums assume col1,col2. col1 have id, col2 have many
ActiveRecord::Base.connection.execute UPDATE ventas SET costo_de_compra = #{@nuevo_costo} WHERE id = #{@vid}; but this updates
The base class includes the field 'lbl', but its type (web.App_Code.CustomLabelControl) is not compatible
Base information: This is in context to the indexing process of OpenStreetMap data. To
Fiddle here: http://jsfiddle.net/rhodee/4NKVH/ I've been reading the Crockford book and was wondering what is
Here is a link to a working fiddle , and here is the live

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.