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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:55:03+00:00 2026-06-09T16:55:03+00:00

I am currently using jquery, and jstree plugin to show images. I am building

  • 0

I am currently using jquery, and jstree plugin to show images. I am building tree based on an xml file that has nodes. Saparately, I am creating images using some third party tool. Image names are -model.png. When a node is picked, depending on the node_id on the tree, I display images on divs.

It works, but the problem is not all nodes have the same number of images. For example node_a would have 10 images, node_b would have 2 images etc. Rather than manually creating the divs and based on the image, hide or show; I would like to display images dynamically. If node_A is clicked on the tree, I should be able to see all the images in 2 column format on the right side using jquery.

My current code is this:

    <div id="column_2">
        <div id="2_div1" ></div>
        <div id="2_div2" "></div>
        <div id="2_div3" ></div>
    </div>

left is my div to build the jstree

$("#left").jstree("toggle_node", data.rslt.obj);

var node_id = data.rslt.obj.attr("id");

node_id is unique id that all images have. based on the car make. For example, it would be GM-Make, Ford-Make, Toyota-Make etc

  if (node_id.indexOf("Make")>=0)
    {
      var Img_year_2012 = "node_id+"-year_2012.png";
       $(function () { 
         $('#1_div1').html("").css({"border": "", "margin": "0"});
        var myImage1 = new Image(); 
        $(myImage1).load(function () 
        {  

        $("#1_div1").html(myImage1).css({"border":"2px solid #E0E0E0", "margin": "20px 20px 20px 0"});
         $( '#1_div1 img' ).css({ "width": "600px", "height" : "650px" });


        })         
        .attr('src', Img_year_2012).error(function(){
            $('#1_div1').html("").css({"border": "", "margin": "0"});
            })

        });

Rather than doing it like this, How can I just display every image belong to a node id?

  • 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-09T16:55:04+00:00Added an answer on June 9, 2026 at 4:55 pm

    Maybe I am misunderstanding the question, but have you tried using a for loop iterating through each node? Some thing like: http://www.w3schools.com/dom/dom_nodes_traverse.asp

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

Sidebar

Related Questions

I am currently using Valums JQuery File Upload plugin. The plugin is very convenient
I am currently using dynaTree jQuery plugin to render a tree. <div id=tree style=height:100px;>
I am currently using a jQuery plugin that is applying a GreyScale hover effect.
I'm currently using jQuery Cookies plugin, and depending on which side of the page
I'm currently using this jQuery validate plugin and having an issue in IE where
I'm currently using the jQuery fullcalendar plugin but I've came across an issue regarding
I am very new to web development. I am currently using tablesorter jquery plugin
I'm currently using the following jQuery plugin: jQuery OEmbed. This plugin works great in
I am currently using jquery ui datepicker for forms that have date inputs. The
I'm currently using this jQuery Cycle Plugin: http://jquery.malsup.com/cycle/ And I have the following code:

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.