got it, i needed a function that re-added the items i wanted:

$.ajax({
     ....
     onSuccess: function(){
          .....
          reAdd();
     }
})

function reAdd(){
     $("h4").click(function(){alert("boo"););
}

jobscry wrote:
> 
> greetings,
> 
> i have a $.ajax call with this as the success function:
> 
> $("users/user", xml).each(
>      function(){
>           userId = $("id",this).text();
>           $("span."+letter).append("<h4 id=\"user_"+userId+"\"
> class=\""+$("firstletter",this).text()+"\">"+$("username",this).text()+"</h4>");
>           $("span."+letter).append("<div id=\"userDetails_"+userId+"\"
> class=\"userDetails\"></div>");
>          
> $("div#userDetails_"+userId).append("<p>$("email",this).text()+"</p>");
>           $("div#userDetails_"+userId).append("<p
> class=\"created\">Created on: "+$("created",this).text()+"</p>");
>           $("div#userDetails_"+userId).append("<p
> class=\"modified\">Modified on: "+$("modified",this).text()+"</p>");
>      }
> );
> 
> afterwards the page has this:
> 
> <span  class="t" style=" display: block; opacity: 0.9999;">
> <h4 id="user_4"  class="t">tester</h4>
> <div  id="userDetails_4" class="userDetails"  style="display: none;">
> <p > [EMAIL PROTECTED]></p>
> <p class="created ">Created on: Sat, Feb 3rd 2007, 14:12</p>
> <p class="modified ">Modified on: Sat, Feb 3rd 2007, 14:12</p>
> </div>
> 
> works nice except i also have this on my page:
> 
> $("h4").click(function(){alert("boo");});
> 
> but when i click any of the ajax genertated h4's nothing happens.
> 
> any help would be much appreciated!
> 
> 
> -- 
> Joe Vasquez
> [EMAIL PROTECTED] 
> 

-- 
View this message in context: 
http://www.nabble.com/after-ajax-dom-not-resetting-tf3178220.html#a8855066
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to