2014-08-27 108 views
-2
<div id="cell"> 
    <div class="choose"> 
    <table width="100%" border="0" cellspacing="0" cellpadding="0"> 
     <tr> 
      <td colspan="2"><h3>Title</h3></td> 
     </tr> 
     <tr> 
      <td align="right"><a href="#" class="ex">CLICK HERE</a></td> 
     </tr> 
    </table> 
    </div> 
    <div class="result"> 
     <img src="images/blank.jpg" width="72" height="72"> 
    </div> 
</div> 

这里是我的HTML,什么是正确的组合,对我来说,点击(a.ex),并能够修改(div.result IMG)的IMG SCR?jQuery的父母兄弟姐妹源

+1

选择图像如果你使用的是jQuery,那么如果你使用粗体作为选择器,你可以关闭它自己的... – Blunderfest 2014-08-27 20:56:21

回答

1

认为这是你在找什么:

$(this).closest('div.choose').next('div.result').find('img') 

你的问题有点含糊,和Blunderfest在评论中提到的,您可以直接与div.result img