use turbo:load instead of DOMContentLoaded
This commit is contained in:
parent
b7bcaaf47a
commit
98d47c060f
1 changed files with 3 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
|
||||
// import "@hotwired/turbo-rails"
|
||||
import "@hotwired/turbo-rails"
|
||||
// import "controllers"
|
||||
|
||||
// import Lightbox from "photoswipe";
|
||||
|
|
@ -154,7 +154,8 @@ function display_error(msg) { console.log("foo");
|
|||
// };
|
||||
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
// document.addEventListener("DOMContentLoaded", () => {
|
||||
document.addEventListener("turbo:load", () => {
|
||||
console.log("DOM loaded");
|
||||
// Handle uploads on specific views/pages. The DIV with ID
|
||||
// #data-js-upload-form carries data attributes that tell us where
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue