Difference between revisions of "Template:Exeter"
Line 410: | Line 410: | ||
</style> | </style> | ||
− | <script | + | <script> |
− | + | $(document).ready(function() { | |
− | + | ||
− | + | $(window).scroll(function () { | |
− | + | //if you hard code, then use console | |
− | + | //.log to determine when you want the | |
− | + | //nav bar to stick. | |
− | $(window).scroll(function( | + | console.log($(window).scrollTop()) |
− | + | if ($(window).scrollTop() > 182) { | |
− | + | $('.navbar-collapse').addClass('navbar-fixed-top'); | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
} | } | ||
if ($(window).scrollTop() < 183) { | if ($(window).scrollTop() < 183) { | ||
$('.navbar-collapse').removeClass('navbar-fixed-top'); | $('.navbar-collapse').removeClass('navbar-fixed-top'); | ||
} | } | ||
− | + | }); | |
− | } | + | }); |
</script> | </script> | ||
Revision as of 22:08, 27 August 2015