smooth things out

This commit is contained in:
prospect
2024-01-19 09:41:32 -05:00
parent 3e8995ddb3
commit a1f63c9ba9
2 changed files with 5 additions and 5 deletions

View File

@@ -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