Flat Preloader Icon
/* Default state: transparent background */
#brx-header.sticky {
  position: sticky;
  top: 0;
  transition: opacity 0.5s ease, background-color 0.5s ease;
  opacity: 1;
  visibility: visible;
  background-color: transparent !important; /* Start with transparent background */
}

/* Hidden state when scrolling down */
#brx-header.sticky.nav-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background-color: transparent !important; /* Stay transparent when hidden */
}

/* Visible state when scrolling up: background becomes black */
#brx-header.sticky.nav-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  background-color: rgba(0, 0, 0, 0.5) !important; /* Background becomes black when scrolling up */
}
document.addEventListener('DOMContentLoaded', function () {
  let lastScrollTop = 0;
  const nav = document.querySelector('#brx-header.sticky'); // Ensure this targets the correct header element
  let hasScrolledDown = false; // Track if the user has scrolled down

  // Listen for the scroll event on the window
  window.addEventListener('scroll', function () {
    let scrollTop = window.pageYOffset || document.documentElement.scrollTop;

    console.log('Scroll position:', scrollTop); // Check scroll position in console

    if (scrollTop > lastScrollTop) {
      // User is scrolling down
      console.log('Scrolling down');
      nav.classList.remove('nav-visible');
      nav.classList.add('nav-hidden');
      hasScrolledDown = true; // User has scrolled down
    } else if (scrollTop < lastScrollTop && hasScrolledDown) {
      // User is scrolling up and has already scrolled down
      console.log('Scrolling up');
      nav.classList.remove('nav-hidden');
      nav.classList.add('nav-visible');
    }

    // Update the last scroll position
    lastScrollTop = scrollTop;
  });
});

Client stories

Inspiring journeys of healing and hope: Real stories of patients whose lives have been transformed by INF Nepal's compassionate care.

All News & Stories:

All Client stories

  • Filter By:

  • Thanks to the skilled team at Green Pastures Hospital, Satish has regained movement in his left hand and a renewed sense of independence. Diagnosed with leprosy at just 17, Satish...

    Posted 2 years ago

  • She recently underwent a transformative surgery at Green Pastures Hospital (GPH) Ear Centre, finally bringing an end to her decades-long struggle.

    Posted 2 years ago

  • She found hope and support through the Paribartan Self-Help Group, part of an INF Nepal initiative in her community. Joining the group offered her a chance to rebuild; with training...

    Posted 2 years ago

  • Maya found a new sense of hope and freedom. “This wheelchair will allow me to be independent at home,” she shares gratefully …

    Posted 2 years ago

  • INF Nepal’s quick response brought much-needed supplies like blankets and mattresses, providing Sunita and her family with warmth and comfort. Her story reflects resilience, strength, and the power of community...

    Posted 2 years ago

  • A Journey of Healing and Hope: Ram Bahadur’s Battle with Leprosy and the Life-Changing Care at Shining Hospital

    Posted 2 years ago

  • Empowerment for women like Ganga means gaining control over their lives, making informed choices, and having resources to pursue their goals. With targeted support from INF Nepal’s Community Health and...

    Posted 2 years ago

  • Gopal Shares Her Story:

    Gopal’s life was forever changed after a devastating road accident left him with a spinal cord injury, but through the unwavering support of his family and the expert care at Green Pastures Hospital, he found the strength to rebuild his life and hope for the future.

    In the past year alone, GPH treated 81 spinal cord injury cases and provided rehabilitation to 688 patients