From 9d1a2a5c3fc9e0a23a432934b2694635649ff351 Mon Sep 17 00:00:00 2001 From: Ernie Park Date: Mon, 5 Mar 2012 15:53:07 -0500 Subject: [PATCH] add active class to 1.0 speed video when page first loaded. --HG-- branch : kf-highlight-speed --- video_init.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/video_init.js b/video_init.js index e6fdd947c5..63b7f055f4 100644 --- a/video_init.js +++ b/video_init.js @@ -35,7 +35,13 @@ loadNewVideo(streams["1.0"], ${ position }); function add_speed(key, stream) { var id = 'speed_' + stream; - $("#video_speeds").append('
  • '+key+'x
  • '); + //TODO: this should be smarter and know which video is first selected when we have + // video speed as an option/parameter per user that is saved + if (key == 1.0) { + $("#video_speeds").append('
  • '+key+'x
  • '); + } else { + $("#video_speeds").append('
  • '+key+'x
  • '); + } $("#"+id).click(function(){ change_video_speed(key, stream);