m |
m |
||
Line 66: | Line 66: | ||
$(function() { | $(function() { | ||
− | + | $('#nav-wrapper').height($(".sidebar-nav").height()); | |
− | + | $('.sidebar-nav').affix({ | |
− | + | offset: { top: $('.sidebar-nav').offset().top } | |
− | + | ||
}); | }); | ||
+ | |||
+ | /*set appropriate width on page load */ | ||
+ | if ($(window).width() >= 768) { | ||
+ | $('.sidebar-nav').css('width', $('.col-sm-3').width()); | ||
+ | } else { | ||
+ | $('.sidebar-nav').css('width', 'auto'); | ||
+ | } | ||
+ | |||
+ | }); | ||
+ | |||
+ | /* adjust width on window resize */ | ||
+ | $(window).resize(function() { | ||
+ | if ($(window).width() >= 768) { | ||
+ | $('.sidebar-nav ').css('width', $('.col-sm-3').width()); | ||
+ | } else { | ||
+ | $('.sidebar-nav ').css('width', 'auto'); | ||
+ | } | ||
+ | }); | ||
+ | |||
</script> | </script> |
Revision as of 19:21, 16 October 2016
Human Practices
Section 1
Try to scroll this section and look at the navigation list while scrolling!
Section 2
Try to scroll this section and look at the navigation list while scrolling!
Section 3
Try to scroll this section and look at the navigation list while scrolling!