Phone : (408) 309-7709 | Fax: 1888-850-2798
Email: hong@megaloans.com | NMLS Number: 1549494
2092 Concourse Dr #25, San Jose, CA  95131

Copyright © 2016 Mega Loans. All Rights Reserved.

$(document).ready(function () { var MQL = 1170; //primary navigation slide-in effect if ($(window).width() > MQL) { var headerHeight = $('.navbar-custom').height(); $(window).on('scroll', { previousTop: 0 }, function () { var currentTop = $(window).scrollTop(); //check if user is scrolling up var customNav = $('.navbar-custom'); if (currentTop < this.previousTop) { //if scrolling up... if (currentTop > 0 && customNav.hasClass('is-fixed')) { customNav.addClass('is-visible'); } else { customNav.removeClass('is-visible is-fixed'); } } else if (currentTop > this.previousTop) { //if scrolling down... customNav.removeClass('is-visible'); if (currentTop > headerHeight && !customNav.hasClass('is-fixed')) { customNav.addClass('is-fixed'); } } this.previousTop = currentTop; }); } });