File: /home/imensosw/www/imenso.co/dev/octb-website/js/custom.js
function second_type_menu(){
if($(".top_area").hasClass("top_area1")){
$("#nav_fix").addClass("navbar-fixed-top");
$(".navbar-brand img").attr('src', 'images/logo_blue.png');
$(".navbar-toggler-icon img").attr('src', 'images/menu_blue.png');
$(".login-icon img").attr('src', 'images/login_blue.png');
}
else{
$(".navbar-brand img").attr('src', 'images/logo.png');
$("#nav_fix").removeClass("navbar-fixed-top");
$(".navbar-toggler-icon img").attr('src', 'images/menu.png');
$(".login-icon img").attr('src', 'images/login.png');
}
}
// When the user scrolls the page, execute myFunction
window.onscroll = function() {myFunction()};
// Get the navbar
var navbar = document.getElementById("nav_fix");
// Get the offset position of the navbar
var sticky = 200;
// Add the sticky class to the navbar when you reach its scroll position. Remove "sticky" when you leave the scroll position
function myFunction() {
if (window.pageYOffset >= sticky) {
navbar.classList.add("navbar-fixed-top");
$(".navbar-brand img").attr('src', 'images/logo_blue.png');
$(".navbar-toggler-icon img").attr('src', 'images/menu_blue.png');
$(".login-icon img").attr('src', 'images/login_blue.png');
} else {
// navbar.classList.remove("navbar-fixed-top");
// $(".navbar-brand img").attr('src', 'images/logo.png');
second_type_menu();
}
}
$(document).ready(function(){
second_type_menu();
});;