Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery get top position of element on scroll

var offset = $(".a1").offset();
var w = $(window);
alert("(x,y): ("+(offset.left-w.scrollLeft())+","+(offset.top-w.scrollTop())+")");
 
PREVIOUS NEXT
Tagged: #jquery #top #position #element #scroll
ADD COMMENT
Topic
Name
7+3 =