scripts/ajax.js
changeset 14 7a1573676cc4
parent 13 b5db2345c397
child 18 69af47034212
--- a/scripts/ajax.js	Wed Mar 26 11:10:20 2008 -0400
+++ b/scripts/ajax.js	Mon Mar 31 07:40:30 2008 -0400
@@ -189,8 +189,7 @@
         if ( first_load )
         {
           first_load = false;
-          var top = $('track_' + current_track).Top() - 138;
-          window.scroll(0, top);
+          jump_current_track();
         }
       }
     });
@@ -323,6 +322,17 @@
 
 addOnloadHook(refresh_playlist);
 
+// scroll to the current track
+function jump_current_track()
+{
+  var top = $('track_' + current_track).Top() - 138;
+  window.scroll(0, top);
+  if ( typeof(fix_scroll) == 'function' )
+  {
+    fix_scroll();
+  }
+}
+
 // pulse the current track
 var pulsar_current = 0, pulsar_tdlist = [], pulsar_direction = 1;