Ajax Link Update Element Does Not Work

I managed to automatically give a different id to my divs

I have the following

<diw class="ajaxlink">

 &lt;div id=&quot;post1&quot;&gt;  


 ..link  1 ...


<div class="ajaxlink>

 &lt;div id=&quot;post2&quot;&gt;


 ...link 2 ...


I want to update a specific div

by selecting the div in the following way

when I click to the link 1, I launched a jquery which

display the correct id ,

if I click the link 1, my command

alert($(".ajaxlink > :first-child").attr("id"));

display post1

if I click the link 2, my command display post2


but when I use the update option

‘update’=>’.ajaxlink > :first-child’

it updates the post1 and post2 div, where it should update the selected post, the alert displays the correct name of the id (post1 or post2)

Can you help me please ?

not ideal solution but this should do it

notice the markup

<div class="article">

	<div class="post" id="post-1">


	<a href="#">Update Link 1</a>


<div class="article">

	<div class="post" id="post-2">


	<a href="#">Update Link 2</a>



	$('.article a').click(function(e) {

		// replace it with your logic

		$(this).siblings('div').css({color: 'red'});



if this is not what you looking for then paste your code in here