Jquery animating child using destination offset with parent set to position relative -



Jquery animating child using destination offset with parent set to position relative -

i've serious problems animating little image 1 place another.

i destination offset , seek animate image towards desired location using offset content coordinates. ends incorrect.

i understand problem position:relative, position:absolute; cannot rid of these becuase of the layout i've...

is there improve way calculate coordinates against window?

i made simplified fiddle can see mean...

http://jsfiddle.net/9wmgk/1/

$("#thirdba a").on("click", function(){ $("#thirdba").append('<p class="animated">this me</p>'); var offset = $("#second").offset(); console.dir(offset.left); console.dir(offset.top); $(".animated").animate({left: offset.left, top: offset.top},"slow"); });

when click link box appended. , must move "come here" div.

any ideas how solve problem?

couldn't animate based on position of sec div ie: $('#second').position() view fiddle below more info

http://jsfiddle.net/davidchase03/9wmgk/3/

let me know -david

jquery

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -