-
-
Save thanhtungdp/083ac7afb64ef6b9d6794f3c5edf6a77 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*! | |
| * Start Bootstrap - Grayscale Bootstrap Theme (http://startbootstrap.com) | |
| * Code licensed under the Apache License v2.0. | |
| * For details, see http://www.apache.org/licenses/LICENSE-2.0. | |
| */ | |
| // jQuery to collapse the navbar on scroll | |
| function collapseNavbar() { | |
| if ($(".navbar").offset().top > 50) { | |
| $(".navbar-fixed-top").addClass("top-nav-collapse"); | |
| } else { | |
| $(".navbar-fixed-top").removeClass("top-nav-collapse"); | |
| } | |
| } | |
| $(window).scroll(collapseNavbar); | |
| $(document).ready(collapseNavbar); | |
| // jQuery for page scrolling feature - requires jQuery Easing plugin | |
| $(function () { | |
| $('a.page-scroll').bind('click', function (event) { | |
| var $anchor = $(this); | |
| $('html, body').stop().animate({ | |
| scrollTop: $($anchor.attr('href')).offset().top | |
| }, 1500, 'easeInOutExpo'); | |
| event.preventDefault(); | |
| }); | |
| }); | |
| // Closes the Responsive Menu on Menu Item Click | |
| $('.navbar-collapse ul li a').click(function () { | |
| if ($(this).attr('class') != 'dropdown-toggle active' && $(this).attr('class') != 'dropdown-toggle') { | |
| $('.navbar-toggle:visible').click(); | |
| } | |
| }); | |
| var logoUnderline = false; | |
| setInterval(function () { | |
| if (logoUnderline) { | |
| $(".navbar-brand .underline").addClass('hide'); | |
| logoUnderline = false; | |
| } else { | |
| $(".navbar-brand .underline").removeClass('hide'); | |
| logoUnderline = true; | |
| } | |
| }, 800); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment