在jQuery中,“祖先后代"和“父母>孩子'? [英] In jQuery, what is the difference between 'ancestor descendent' and 'parent > child'?

查看:133
本文介绍了在jQuery中,“祖先后代"和“父母>孩子'?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我相当忙于尝试完成某项工作,而又不会被一项新技术的另一次冒险所误导,所以我采取了懒惰的方法.

jQuery API浏览器列出了这两个选择器,但父子选择器在我认为可行时永远不会起作用,但后代选择器却起作用,反之亦然.这些选择器上的涂料是什么?

I''m rather busy trying to finish something without being sidetracked by yet another adventure in a new tech, so I''m taking the lazy approach.

The jQuery API browser lists these two selectors, but the parent child one never works when I think it will, but the descendent one does, and vice versa. What''s the dope on these selectors?

推荐答案

我不是专家(实际上,关于jQuery,我是一个无知的人),但是祖先和后代通常分别指父母的父母的父母(等等)和孩子的孩子的子女(等等).因此,孩子/父母是直接的关系,祖先/后代是递归的.
I''m no expert (in fact, I''m an ignoramus when it comes to jQuery), but ancestor and descendent would typically refer to parents of parents of parents (etc.) and children of children of children (etc.), respectively. So, child/parent are direct relations and ancestor/descendent are recursive.


这篇关于在jQuery中,“祖先后代"和“父母>孩子'?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆