Skip to content

Commit

Permalink
fix refresh bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammadali-arjomand committed Jul 21, 2023
1 parent 9a9bdd4 commit bc0db12
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions scripts/singlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ class Page { // create parent class for pages
load(id) { // load template helper
return document.getElementById(id).innerHTML // find template and return inner of template
}
refresh() {
this.singlight.start()
refresh() { // refresh page
element.innerHTML = activePage.template() // set page template to element
activePage.render(element) // render page
}
title(title) { // title helper
document.title = title // set new title
Expand Down
2 changes: 1 addition & 1 deletion scripts/singlight.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bc0db12

Please sign in to comment.