show hide nested ul(s) with jquery?

I have li list with which exapands fine if i click the li are but i want it to expand if i click the link 'a' not the li. how do i make the jquery below work on the a not the li? below is the code i have so far: $("#leftcontent ul li:not(:has(li.current))").find("ul").hide().end() // Hide all other ULs .click(function(e) { if (this == { // if the handler element is where the event originated $(this).children('ul').slideToggle('fast'); } });
Share your markup... it's beautiful when you ask with a full pack of code. Throw it at us, we love swimming in it.

以上就是show hide nested ul(s) with jquery?的详细内容,更多请关注web前端其它相关文章!

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

评论 抢沙发

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

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