how do I use jquery to get the absolute position where the scroll bar scrolls to one of the div on the page?
<div class="page-warp">
<div class="page page-one">
<div class="left-features">
page-one
</div>
<div class="right-lock">
<div class="ul1-lock">
<img src="img/door_lock.png"/>
</div>
</div>
</div>
<div class="page page-two">
<div class="left-features">
page-two
</div>
<div class="right-lock">
<div class="ul1-lock">
<img src="img/door_lock.png"/>
</div>
</div>
</div>
<div class="page page-three">
<div class="left-features">
page-three
</div>
<div class="right-lock">
<div class="ul1-lock">
<img src="img/door_lock.png"/>
</div>
</div>
</div>
</div>
for example, when you want to get scrolling to page-two, you need to execute a method. I wrote this:
var itemTwo = $(".page-two").offset().top;
but I can"t tell if itemTwo is the location of page-two?
what should I do?