fixing closing button behaviour
This commit is contained in:
parent
cf2bf7ac6b
commit
932620e27b
2 changed files with 4 additions and 3 deletions
|
@ -2,8 +2,8 @@
|
|||
async function loadContent(sectionId, contentFile) {
|
||||
try {
|
||||
console.log(`Loading content for ${sectionId} from ${contentFile}`);
|
||||
// Use relative path instead of absolute path
|
||||
const response = await fetch(`../content/${contentFile}`);
|
||||
// Use correct relative path
|
||||
const response = await fetch(`/content/${contentFile}`);
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP error! status: ${response.status}`);
|
||||
}
|
||||
|
|
|
@ -298,7 +298,8 @@
|
|||
|
||||
// Handle the × button click
|
||||
$this.find('button.close').on('click', function(event) {
|
||||
event.stopPropagation(); // Prevent the click from bubbling to the article
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
location.hash = '';
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue