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

  • Home
  • SEARCH
  • 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 8806359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:06:29+00:00 2026-06-14T02:06:29+00:00

I don’t know how to ask this question at all. in case some one

  • 0

I don’t know how to ask this question at all. in case some one don’t understand this, i am sorry. thing is, i have the object, and i am looping that using each function, when i get sub object (internal obejct), i would like to assign back to the same each function for that, what is the good idea?

look my issue:

myObject:

var xploreMaps = {
    radious:55,
    stroke:5,strokeColor:'#fff',
    opacity:0.8,fontSize:13,line:10,
    cGtext:{
        length:5,
        lineColor:'#579549',
        prop:{
            0:{link:'catalogs .html',color:'#7a5967',text:'Catalogs',
            subLink:{0:{link:'SEO_SMM.html',color:'#4e4b69',text:'SEO/SMM',align:'top'},1:{link:'site_analytics.html',color:'#545454',text:'Site analytics',align:'btm'}}},
            1:{link:'socialmedia.html',color:'#1e9ead',text:'Innovation'},
            2:{link:'loyalty .html',color:'#8fad34',text:'Ideation'},
            3:{link:'promotions .html',color:'#563b64',text:'Promotions'},
            4:{link:'implementations.html',color:'#2c6566',text:'Implementations',
            subLink:{0:{link:'integrating.html',color:'#4c4a66',text:'Integrating',align:'top'},1:{link:'payment.html',color:'#948048',text:'Payment',align:'btm'}}}
            }
    }
}

var object = xploreMaps[id].prop || 'i need subLink';

myfunction:

    $.each(object, function (n,d) {

                var Color = this.color,link = this.link,text=this.text,**subLink** = this.subLink || '';

   // if the sublink there, i need to put back to each, and do the same stuff, what i do for it's parent object.

                var myTimeout = setTimeout(function(){
                    redSubCircles.push(paper.path("M"+x +" "+y)
                    .attr({stroke:brdColor})
                    .animate({path:"M"+(x-((stroke/2)+(n*((radious*2)+stroke+line)))) +" "+y+'l'+(-line)+' 0'},1000,
                        function(){
                            var c =    paper.circle((x-(radious+stroke+line) - n*((radious*2)+stroke+line)),y,radious)
                            .attr({
                                stroke:strokeCl,
                                'stroke-width':stroke,
                                opacity:opacity,
                                fill:Color,
                                href:link
                            });

                            var p =    paper.text((x-(radious+stroke+line) - n*((radious*2)+stroke+line)),y,text)
                            .attr({fill:strokeCl,'font-size':fSize,href:link})

                            redSubCircles.push(c,p)//push to set;-

                        }));
                },1000*n)
            } )

if i am wrong, i am sorry. please advice me the right way.

  • 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-14T02:06:30+00:00Added an answer on June 14, 2026 at 2:06 am

    Perhaps a while loop and a temporary array would help you.

    Add your initial items to the temporary array
    Call the function while there are items in your temporary array

    Every time you encounter a sub link push it onto the temporary array you’re iterating it through. Temporary array gets bigger, and continues to run.

    Every time you’ve completed an item, remove it. Temporaray array gets smaller, and eventually reaches zero – completing your loop.

    You’ll need while, push, and splice to remove items from your array.

    Here’s a standalone example of this in action, and a demo here

    <!DOCTYPE HTML>
    <html lang="en-US">
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
    <h1>looper</h1>
        <script type="text/javascript">
        function ObjectMaker(identifier) {
            var that = {
              subObj:null,
              name: identifier,
              getName: function() {
                return "I am "+this.name;
              },
              setSubObj: function(sub) {
                this.subObj = sub ;
              }       
            }
            return that;
        }
        var twoAndAHalf = ObjectMaker("two and  a half");
        var two = ObjectMaker("two");
        two.setSubObj(twoAndAHalf);
        var items = [ObjectMaker("one"),two,ObjectMaker("three")];
        while(items.length>0) {
            if (items[0].subObj != null) {
                items.push(items[0].subObj);
            }
            alert(items[0].getName());
            items.splice(0,1);
        }
        </script>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Don't know if this is the right place to ask this, but I will
Don't know where else to ask, but from one day to the other my
Don't know if this has been asked before, so point me to another question
I don't have much knowledge about the IPv6 protocol, so sorry if the question
Don't know if this has been answered before. Have custom routes to users. If
Don't know why but I can't find a solution to this. I have 3
Don't know the term for the red validation border, does it have one? I
DON'T ASK WHY but... I have a regex that needs to be case insensitive
Don't know how to phrase this question but I need to modify the child
don't know better title for this, but here's my code. I have class user

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.