i have one div with scroll.
once i stops scrolling i want to know the scrolltop height.
how can i do this?
Find scroll top of div
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Nov 24, 2014, 11:17 PM EST
Hi samanta,
Read these links, it will help you
http://stackoverflow.com/questions/5902822/stopping-fixed-position-scrolling-at-a-certain-point
http://www.wduffy.co.uk/blog/keep-element-in-view-while-scrolling-using-jquery/
Joginder BangerRank #360 · 7K reputationPosted Nov 25, 2014, 12:27 AM EST
If you are using ajax,
.scrollwill not affect the div because it won't find it because it doesn't exist. Instead, delegate with.on:$(document).on('scroll', '.div', function () {Abhijeet SinghRank #415 · 6K reputationPosted Mar 29, 2015, 12:12 AM EDT
http://stackoverflow.com/questions/303767/how-do-i-determine-height-and-scrolling-position-of-window-in-jquery
Muralishankar Sundaram114 reputationPosted Apr 21, 2015, 11:03 PM EDT
By using scrollTop- javascript property, we can easily
var element = document.getElementById("myDIV");
var scrollTopHeight = elmnt.scrollTop;
Regards,
Muralishankar.