smooth things out
This commit is contained in:
@@ -158,10 +158,6 @@ class PageTransitions {
|
||||
fetch(targetUrl).then(response => response.text()).then(data => {
|
||||
this.updateContent(data, elementId);
|
||||
history.pushState(null, null, targetUrl);
|
||||
// Trigger removal of transition class after fetching data
|
||||
setTimeout(() => {
|
||||
this.removeTransitionClass(contentContainer);
|
||||
}, 300);
|
||||
}).catch(error => console.error('Error fetching content:', error));
|
||||
}
|
||||
submitFormAsync(form) {
|
||||
@@ -194,6 +190,10 @@ class PageTransitions {
|
||||
|
||||
// Update the content container
|
||||
contentContainer.innerHTML = newContent;
|
||||
// Trigger removal of transition class after fetching data
|
||||
setTimeout(() => {
|
||||
this.removeTransitionClass(contentContainer);
|
||||
}, 300);
|
||||
|
||||
// Update the page title
|
||||
const newTitle = parsedData.querySelector('title');
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user