admin管理员组

文章数量:1417070

Here is the code:

dojo.query(subNav.navClass).forEach(function(node, index, arr){
        if(dojo.style(node, 'display') == 'block'){

           "NOW HOW WOULD I FIND CHILDREN????"

            });
        }
    });

By the way I just started working with DOJO, i am primarily working in jQuery.

So now that i have found node that has its display set to block, i want to preform something to its specific children, how would i preform query on children of the node that i just stopped on?

any clarification, suggestion? thank you.

Here is the code:

dojo.query(subNav.navClass).forEach(function(node, index, arr){
        if(dojo.style(node, 'display') == 'block'){

           "NOW HOW WOULD I FIND CHILDREN????"

            });
        }
    });

By the way I just started working with DOJO, i am primarily working in jQuery.

So now that i have found node that has its display set to block, i want to preform something to its specific children, how would i preform query on children of the node that i just stopped on?

any clarification, suggestion? thank you.

Share Improve this question asked Oct 8, 2010 at 19:01 GnrlBzikGnrlBzik 3,3505 gold badges29 silver badges37 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 5
     dojo.query('> li .secondary_nav_dropdown', node).style('display', 'none');

The second parameter specifies origin where the query should start from.

Dojo query documentation

U can use array children and mapping like this:

dojo.map(node.children, function(child){
// work with child
})

本文标签: javascriptDOJO find childStack Overflow