We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOM结构为:
现在我使用siblings()方法来选取符合要求节点的兄弟节点。 在http://docs.kissyui.com/1.4/docs/html/api/dom/siblings.html上是这么介绍siblings方法的:
然后我写了两段代码 var $lis = $('.J_Filter').all('li'); //first var $li = $lis.siblings('li'); $('body').append("
siblings('li')过滤的结果:长度为:"+$li.length+" 节点为:"+$li.text()+" "+$li.next().text()+'
siblings('.css')过滤的结果:长度为:"+$li.length+" 节点为:"+$li.text()+'
很明显第一次过滤的结果是符合文档上的描述的,但是第二次过滤的结果不是返回 javascript节点和html节点 而是css节点本身,这点让我非常费解,求大神指点迷津啊!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
DOM结构为:
现在我使用siblings()方法来选取符合要求节点的兄弟节点。
在http://docs.kissyui.com/1.4/docs/html/api/dom/siblings.html上是这么介绍siblings方法的:
然后我写了两段代码$lis = $ ('.J_Filter').all('li');
var
//first
var $li = $lis.siblings('li');
$('body').append("
siblings('li')过滤的结果:长度为:"+$li.length+" 节点为:"+$li.text()+" "+$li.next().text()+'
');//second
var $li = $lis.siblings('.css');
$('body').append("
siblings('.css')过滤的结果:长度为:"+$li.length+" 节点为:"+$li.text()+'
');结果很奇怪:
siblings('li')过滤的结果:长度为:2 节点为:html css
siblings('.css')过滤的结果:长度为:1 节点为:css
很明显第一次过滤的结果是符合文档上的描述的,但是第二次过滤的结果不是返回 javascript节点和html节点 而是css节点本身,这点让我非常费解,求大神指点迷津啊!
The text was updated successfully, but these errors were encountered: