views:

26

answers:

2

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.

A: 

as you should remind yourself sometimes "RTFM", this is for my self primerly.

     dojo.query('> li .secondary_nav_dropdown', node).style('display', 'none');

second parametor specifies origin where the query should start from....

GnrlBzik
A: 

U can use array children and mapping like this:

dojo.map(node.children, function(child){
// work with child
})
Stark
This answer is misinformative... firstly, `dojo.map` doesn't make sense here; the way you're using it, you'd be far more interested in using `dojo.forEach`. secondly, you probably meant `node.childNodes`, not `node.children` which appears to be Gecko-1.9 specific.
Ken
thank you guys, still. I found the answer by reading documentation fully. Silly me. Ended up posting this stuff prior dedicated extra time to read through. But still thank you for the input.
GnrlBzik