[JQuery] 選取children的children

看板Ajax作者 (夏天到了,冷不起來了說)時間16年前 (2009/01/06 22:49), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
== HTML == <td rel="dropdown_menu"> TEXT <a id="login" href="javascript:void(0)"> <img src="default.png" align="top"> </a> </td> <td rel="dropdown_menu"> TEXT1 <a id="search" href="javascript:void(0)"> <img src="default.png" align="top"> </a> </td> == JQuery == $("td[@rel='dropdown_menu']").hover( function(){ $(this).children("A > IMG").attr("src","hover.png"); }, function(){ ...... } ) 為何用.children("A>IMG")或是.children("A IMG")都無效? 要用到$(this).children("A").children("IMG")才能選擇 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.104.154.32
文章代碼(AID): #19OszSd5 (Ajax)
討論串 (同標題文章)
文章代碼(AID): #19OszSd5 (Ajax)