set top position with jquery
I am setting top of the div with jquery. My code is following

    alert("*******************"+$('#'+Main.buttonId[Main.index]+"_details").height());
			var detailsHeight=$('#'+Main.buttonId[Main.index]+"_details").height();
			if($('#'+Main.buttonId[Main.index]+"_details").css('visibility')=="hidden")
			{	
				$('#'+Main.buttonId[Main.index]+"_details").css('visibility','visible').height('1px');
				$('#'+Main.buttonId[Main.index]+"_details").animate({"height":detailsHeight+"px"}, 500);
				alert($('#'+Main.buttonId[Main.index+1]).position().top+"*******");
				movable=$('#'+Main.buttonId[Main.index+1]).position().top+detailsHeight;
				alert("movable:"+movable);
				$('#'+Main.buttonId[Main.index+1]).css('top', movable+'px');
				alert($('#'+Main.buttonId[Main.index+1]).position().top+"****after***");
			}

 I am setting position in this line **$('#'+Main.buttonId[Main.index+1]).css('top', movable+'px');**
but unable to set position.

so please suggest me what to do.
set top position with jquery
===

I am setting top of the div with jquery. My code is following

    alert("*******************"+$('#'+Main.buttonId[Main.index]+"_details").height());
			var detailsHeight=$('#'+Main.buttonId[Main.index]+"_details").height();
			if($('#'+Main.buttonId[Main.index]+"_details").css('visibility')=="hidden")
			{	
				$('#'+Main.buttonId[Main.index]+"_details").css('visibility','visible').height('1px');
				$('#'+Main.buttonId[Main.index]+"_details").animate({"height":detailsHeight+"px"}, 500);
				alert($('#'+Main.buttonId[Main.index+1]).position().top+"*******");
				movable=$('#'+Main.buttonId[Main.index+1]).position().top+detailsHeight;
				alert("movable:"+movable);
				$('#'+Main.buttonId[Main.index+1]).css('top', movable+'px');
				alert($('#'+Main.buttonId[Main.index+1]).position().top+"****after***");
			}

 I am setting position in this line **$('#'+Main.buttonId[Main.index+1]).css('top', movable+'px');**
but unable to set position.

so please suggest me what to do.