Schmidtchen (Talk | contribs) |
Schmidtchen (Talk | contribs) |
||
Line 212: | Line 212: | ||
</style> | </style> | ||
+ | <script> | ||
+ | $(window).scroll(function() { | ||
+ | if ($(".navbar").offset().top > 50) { | ||
+ | $('#custom-nav').addClass('affix'); | ||
+ | $(".navbar-fixed-top").addClass("top-nav-collapse"); | ||
+ | } else { | ||
+ | $('#custom-nav').removeClass('affix'); | ||
+ | $(".navbar-fixed-top").removeClass("top-nav-collapse"); | ||
+ | } | ||
+ | }); | ||
+ | </script> | ||
</head> | </head> |
Revision as of 12:11, 16 October 2018