Skip to content

Commit

Permalink
privacy page toggle button resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
sayanp607 committed Nov 3, 2024
1 parent 5862bf0 commit 8642ca0
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions privacy.html
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,37 @@ <h4>FIND US</h4>
wrapper_selector: ".gtranslate_wrapper",
};
</script>
<script>
//toggle chatbot function
function toggleChatbot() {
const chatbotContainer = document.getElementById("chatbot-container");
chatbotContainer.classList.toggle("chatbot-show");
}

// Toggle Navbar Links
const navToggle = document.getElementById('navToggle');
const navlinks = document.getElementById('navLinks');

navToggle.addEventListener('click', () => {
navlinks.style.display = navlinks.style.display === 'flex' ? 'none' : 'flex';
});

// Ensure navbar links are visible on large screens
window.addEventListener('resize', () => {
if (window.innerWidth > 768) {
navlinks.style.display = 'flex'; // Show links on large screens
} else {
navlinks.style.display = 'none'; // Hide links on small screens
}
});

// Set initial state based on the current window size
if (window.innerWidth > 768) {
navlinks.style.display = 'flex'; // Show links if starting on a large screen
} else {
navlinks.style.display = 'none'; // Hide links if starting on a small screen
}
</script>
<script
src="https://cdn.gtranslate.net/widgets/latest/float.js"
defer
Expand Down

0 comments on commit 8642ca0

Please sign in to comment.