Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(640)

Unified Diff: gm/rebaseline_server/static/utils.js

Issue 446933002: make the action buttons for rebaseline server stick to the top of the window as you scroll (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address Elliot's comments Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/rebaseline_server/static/loader.js ('k') | gm/rebaseline_server/static/view.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/rebaseline_server/static/utils.js
diff --git a/gm/rebaseline_server/static/utils.js b/gm/rebaseline_server/static/utils.js
new file mode 100644
index 0000000000000000000000000000000000000000..e846b90bd663963e243446d2a5d6c8cffdf55ed0
--- /dev/null
+++ b/gm/rebaseline_server/static/utils.js
@@ -0,0 +1,12 @@
+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");
+ }
+ });
+}
« no previous file with comments | « gm/rebaseline_server/static/loader.js ('k') | gm/rebaseline_server/static/view.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698