0
在这里,我正在运行一个脚本,它也突出显示了当前单词。转录本向上滚动,文本丢失视图,问题突出显示。我想要发生的是,当突出显示到盒子的顶部时,它应该停留在顶部视线中,并且不会向上消失。你能帮我吗???滚动脚本,scrollTop,回调函数
function runTransript() {
//var player = _V_('video');
//var videoCurrentTime = player.currentTime();
var transcriptSpeed = 300; //videoCurrentTime;
transcriptSpeed *= $("#transcript .full-transcript").parent().height();
$("div").css({ top: $(this).parent().height() + 'px' });
$("div").animate({top: -$(this).height() }, transcriptSpeed, 'linear');
$(".transcript-text").each(function(index){
var curObj = $(this);
var interval = $(this).attr('time');
curObj.delay(interval).animate({color: '#5c9127'}, 100, function() {
$(this).prev().removeAttr("style").prev().removeAttr("style").prev().removeAttr("style");
});
});
}