From ed202b61d314b1dc1e9f55873857193828f07e35 Mon Sep 17 00:00:00 2001 From: danielgrippi Date: Thu, 31 Mar 2011 01:56:06 -0700 Subject: [PATCH] scroll to top before content loads for smoother feedback --- public/javascripts/aspect-filters.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/public/javascripts/aspect-filters.js b/public/javascripts/aspect-filters.js index 89b74a9cb..9c70fc7d9 100644 --- a/public/javascripts/aspect-filters.js +++ b/public/javascripts/aspect-filters.js @@ -37,11 +37,13 @@ $(document).ready(function(){ }); // loading animation - $("#aspect_stream_container").fadeTo(100, 0.4); - $("#aspect_contact_pictures").fadeTo(100, 0.4); + $("#aspect_stream_container").fadeTo(200, 0.4); + $("#aspect_contact_pictures").fadeTo(200, 0.4); performAjax( $(this).attr('href')); } + + $('html, body').animate({scrollTop:0}, 'fast'); }); $("#aspect_nav a.aspect_selector").click(function(e){ @@ -171,9 +173,6 @@ $(document).ready(function(){ photos_html = photos_html + "
  • " + ("") + "
  • "; }; - - $('html, body').animate({scrollTop:0}, 'fast'); - // reinit listeners on stream photozone.html(photos_html); Stream.initialize();