capturing an anchor tag inside div tags

capturing an anchor tag inside div tags


how do i do that with this code

 $(document).ready(function() 
 {
  $('a').click(function(){ 
   alert($(this).text()); 
   alert($(this).attr('href')); 
   return false; });
  });


which work if the anchors are just like

<a href="/test1">---1---</a> 
<a href="/test2">---2---</a> 
<a href="/test3">---3---</a> 

if they are embedded in div they do not work 
<div style=display:table; class="clsMenu" id="divMenuSystem"> 
 <div style=margin:0,0,0,0;> 
  <a href="/Eureka/Home.aspx" target="_parent" onClick="closeAllSubMenus();"">Home</a> 
 </div> 
 <div style=margin:0,0,0,0;>
   <a href="/Eureka/IPAQ/IPAQAssignments.asp" target="_parent" onClick="closeAllSubMenus();"">IPAQ Summary</a> 
 </div>
 <div style=margin:0,0,0,0;> 
   <a href="https://www.askcnet.com/cgi-bin/wonderdesk/wonderdesk.cgi" target="_new" onClick="closeAllSubMenus();"">Eureka System Support</a>
 </div> 
 <div style=margin:0,0,0,0;> 
  <a href="/Eureka/Logout.aspx" target="_parent" onClick="closeAllSubMenus();"">Logout</a> 
 </div>
</div>