javascriptjqueryoffsetoffsetof

Getting every offsetParent or the total offSetTop and total offSetLeft


I want to get the total offSetTop and the total offSetLeft of a child element which have many level of parent element and may be adding up.

Is that any shorthand way, besides of adding one by one in manual ways?


Solution

  • using jQuery: $( node ).offset() then .top and .left