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;  


 &lt;/div&gt;





 ..link  1 ...

</div>

<div class="ajaxlink>

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


 &lt;/div&gt;


 ...link 2 ...

</div>

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

Fine.

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">

	</div>


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

</div>


<div class="article">

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

	</div>

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

</div>


<script>

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

		// replace it with your logic

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

	});

</script>

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