I have two divs that clicking to first dive cause toggle of second div.
#a{ border:1px solid red;width:400px;margin:50px;}
#b{position:absolute;border:1px green solid; width:400px;top:150px;}
and
<div id="a">AAAAAAAAAAAA</div><div id="b">BBBBBB</div><div id="test" >Write Cordinates here</div>
$("#a").click(function(){
var burasi = $(this).offset();
var tepe=burasi.top + $(this).outerHeight(true);
var ici = $("#b");
ici.offset({top: tepe, left: burasi.left});
window.console.log({top: tepe, left: burasi.left} );
$("#test").html("top: "+tepe+", left: "+burasi.left);
ici.fadeToggle("slow");
})
As here. When A would be clicked toggle is executed so good but when div B going to shown its coordinates be changed. How can I prevent it and make div B at same place?