skia2/gm/rebaseline_server/static/utils.js

13 lines
320 B
JavaScript

function make_results_header_sticky( ) {
element = $(".results-header-actions");
var pos = element.position();
$(window).scroll( function() {
var windowPos = $(window).scrollTop();
if (windowPos > pos.top) {
element.addClass("sticky");
} else {
element.removeClass("sticky");
}
});
}