Hello,

I have the following case and I don't know what's happening...

I have a sidebar #menu where in document ready I have:

$('#menu).load('/menu')

#menu is loaded with something like:
<div id="menu">
  <div id="level1">
     various <a> tags
  </div>

  <div id="level2">
    various <a> tags
  </div>

  <div id="level3">
  various <a> tags
  </div>

</div>

Now I want to assign to each of the <a> tags some click functions. I
do :

$(document).ready(function() {
   $('#menu).load('/menu');
   $('#level1 a').each(function(){$(this).click(function(){alert
'test'})})
})

But this doesn't work. Can jquery access elements it has loaded with
load ajax function?

thanks

Reply via email to