Scroll playlist to current video

This commit is contained in:
calzoneman 2013-04-13 12:14:44 -05:00
parent 4e2702f65f
commit cb9624e523
1 changed files with 3 additions and 0 deletions

View File

@ -248,6 +248,9 @@ function initCallbacks() {
} }
var linew = $("#queue").children()[data.idx]; var linew = $("#queue").children()[data.idx];
$(linew).addClass("alert alert-info"); $(linew).addClass("alert alert-info");
$("#queue").scrollTop(0);
var scroll = $(linew).position().top - $("#queue").position().top;
$("#queue").scrollTop(scroll);
POSITION = data.idx; POSITION = data.idx;
if(CHANNELOPTS.allow_voteskip) if(CHANNELOPTS.allow_voteskip)
$("#voteskip").attr("disabled", false); $("#voteskip").attr("disabled", false);