- This topic is empty.
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › How can i make a friendfeed like window scrollcontrol system
When you active real-time updates, new entries dynamically adding a div. At this stage scroll is automatically moving. This action provides the content you do not miss on visible area.
If you want to see this action, you can also watch this screencast; http://www.viddler.com/explore/itod/videos/45/
My method;
// After coming to the new entry, i call this function;
function scroll_control() {
var scroll_top = jQuery(window).scrollTop();
if (scroll_top != 0) {
if (jQuery(‘#’+window.show_id).length != 0) {
var scr = jQuery(‘#’+window.show_id).offset().top – window.pos_y;
window.scrollTo(0, scr);
}
}
}
But this is due to flashing. I guess this method is not fast enough