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

Side by Side Diff: src/site/js/bootstrap-subnav.js

Issue 10788006: new site (Closed) Base URL: https://code.google.com/p/dartlang-site/@master
Patch Set: final patch Created 8 years, 5 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 unified diff | Download patch
« no previous file with comments | « src/site/js/bootstrap-dropdown.js ('k') | src/site/js/bootstrap-tab.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 $(document).scroll(function(){
2 // If has not activated (has no attribute "data-top"
3 if (!$('.subnav').attr('data-top')) {
4 // If already fixed, then do nothing
5 if ($('.subnav').hasClass('subnav-fixed')) return;
6 // Remember top position
7 var offset = $('.subnav').offset()
8 $('.subnav').attr('data-top', offset.top);
9 }
10
11 if ($('.subnav').attr('data-top') - $('.subnav').outerHeight() <= $(this).sc rollTop())
12 $('.subnav').addClass('subnav-fixed');
13 else
14 $('.subnav').removeClass('subnav-fixed');
15 });
OLDNEW
« no previous file with comments | « src/site/js/bootstrap-dropdown.js ('k') | src/site/js/bootstrap-tab.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698