Open jpatelaxon opened 4 years ago
@jpatelaxon
I Found this solution to be working in React/NextJS. Whenever the user switches bootstrap navs tab.
useEffect(()=>{
if(typeof window !== 'undefined' && typeof document !== 'undefined'){
let tabEl = document.querySelector('button[data-bs-toggle="tab"]')
tabEl.addEventListener('hidden.bs.tab', function (event) {
AOS.refreshHard();
})
tabEl.addEventListener('shown.bs.tab', function (event) {
AOS.refreshHard();
})
}
})
Bootstrap Version : 5.1.0 React Version : 17.0.1
Problem: First tab's animation works fine, then i show next tab using click action where i fire AOS.refresh() but animation wont work.
I havae tried following code(s) inside click action:
any suggestion be great.
My HTML: