some text
other text

JQuery Sub Selector question

my html
some text
other text
just text
my call I have this element than can be any jquery selector, 1 or more elements: var x = $("#x"); now I NEED (this is a plugin who will discover inner elements like tabs) to navigate only thru the firsts DIV elements and not its childrends. I'm trying... $.each($($("div"), x), function() { alert($(this).html()); }); shows: 1. some text
other text
2. other text 3. just text $.each($($("div"), x).siblings(), function() { alert($(this).html()); }); shows: 1. just text 2. some text
other text
this is the most approximate, but I need in the correct order. any suggestion ? thanks ps. because it's a plugin I cant do this. $("#x", "div....") I need to do this #(newselector, x)

以上就是JQuery Sub Selector question的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准