Reputation: 3358
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.
Upvotes: 2
Views: 7155
Reputation: 3358
dojo.query('> li .secondary_nav_dropdown', node).style('display', 'none');
The second parameter specifies origin where the query should start from.
Upvotes: 5
Reputation: 31
U can use array children and mapping like this:
dojo.map(node.children, function(child){
// work with child
})
Upvotes: -1