JQuery Access Elements in Modified DOM

Posted by Bernhard on Stack Overflow See other posts from Stack Overflow or by Bernhard
Published on 2010-03-19T22:24:23Z Indexed on 2010/03/19 22:31 UTC
Read the original article Hit count: 327

Filed under:
|

Hi there,

im trying since a long term to use events on elements in my dom which has been added asynchronus. I´ve read something about bind but is there a different Way to etablish something like this?

For Example I have this situation.

$.getJQUERY(myUrl, {var:value}, function(i, data){
  $.each(data.values, function(value){
      $("body").append('<div id="div_no_'+i+'">'+value+'</div>);
     // Here i dont want to place the EventListeners
  })
});
$("div_no_1").click(function(){
    // do something
});

Could someone help me to find a way to etablish something like this??

Thank you in advance

Great

Bernhard

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about getjson