Hi ,

I'm making a ajax call using $.ajax
my code is

$.ajax({
   type: "POST",
   url: "sample.php",
  dataType:"html",
   data: "name="+$('#name').val(),
   success: function(msg){
     $('#result').append(msg);
   }
 });

And the response is

<a href="#" id="1123" class="user-link">User1</a>

When i try to get the Id from the response, it's seems not working..


$('.user-link').click(function(){
alert($(this).attr('id'));
});


And i need to make this work urgently...


Any help will be greatly appreciated...

Thanks in advance...

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to