tags:

views:

24

answers:

1

Hi,

when loading content via ajax requests, If the response is:

<div id="container">
    <a href="http://www.google.com"&gt;To Google</a>
    <a href="http://www.yahoo.com"&gt;To Yahoo</a>
    <a href="http://www.digg.com"&gt;To Digg</a>
</div>

With the jquery loaded, and after content loading, i call a function that do the following:

<script type="text/javascript">
var hrefs = "";
var texts = "";
$('#container').find('A').each(function(){
    hrefs += ", " + $(this).attr('href');
    texts += ", " + $(this).html();
});
</script>

FF and Safari works fine and gain access to the links loaded. IE sucks so bad; it behaves like they don't exist.

Any help would be so much appreciated.

Barry;

+1  A: 
  1. How do you ensure you call the method only after the DOM has been loaded? With $(document).ready?
  2. Try using lowercase (though HTML is case insensitive) and doing find('a') or using children('a')
Júlio Santos