I feel like I have to use way too many .children()
in some of my jQuery functions.
Here\'s my HTML:
Instead of
$(this).children('.goal-content').children('.goal-row').children('.goal-actions').css({visibility: "visible"});
You can use:
$(this).find('> .goal-content > .goal-row > .goal-actions').css({visibility: "visible"});
For exactly the same meaning. If there's no chance of that being ambiguous, however, (.goal-actions
will only appear in that structure of the markup) you can just use find('.goal-actions')
.