Ricerca avanzata
Cerca Tour
Categoria
Location
Data
Livello 1
Livello 2
Livello 3
Livello 4
Livello 5
Difficoltà
Durata:
1g
2g
3gg
4gg
5gg
7gg
Cerca
Skip to main content
English
Home
Chi siamo
Tour
Gallery
Video
Contatti
Prenota
7
Ricerca avanzata
Cerca Tour
Categoria
Location
Data
Livello 1
Livello 2
Livello 3
Livello 4
Livello 5
Difficoltà
Durata:
1g
2g
3gg
4gg
5gg
7gg
Cerca
Home
Chi siamo
Tour
Gallery
Video
Contatti
Prenota
Home
Mio Account
Mio Account
Accedi
Registrati
Clicca per Registrarti
document.addEventListener('DOMContentLoaded', function () { // Funzione per attivare il tab corretto in base all'hash function activateTabFromHash() { const hash = window.location.hash; if (hash) { const tabTriggerEl = document.querySelector(`.nav-link[data-bs-target="${hash}"]`); if (tabTriggerEl) { const tab = new bootstrap.Tab(tabTriggerEl); tab.show(); scrollToActiveTabPane(); } } } // Scrolla al tab-pane attivo function scrollToActiveTabPane() { const activePane = document.querySelector('.tab-pane.active'); if (activePane) { //activePane.scrollIntoView({ behavior: 'smooth', block: 'start' }); activePane.scrollIntoView({ block: 'start' }); } } // Aggiungi listener click per aggiornare hash e attivare il tab document.querySelectorAll('.nav-link').forEach(link => { link.addEventListener('click', function (event) { event.preventDefault(); const target = this.getAttribute('data-bs-target'); if (target) { history.pushState(null, '', target); // cambia hash senza scroll immediato const tab = new bootstrap.Tab(this); tab.show(); scrollToActiveTabPane(); } }); }); // Scrolla al tab-pane attivo quando cambia il tab document.querySelectorAll('.nav-link').forEach(link => { link.addEventListener('shown.bs.tab', function () { scrollToActiveTabPane(); }); }); // Attiva il tab corretto al caricamento activateTabFromHash(); // Aggiorna il tab attivo se cambia l'hash window.addEventListener('hashchange', activateTabFromHash); });