mirror of
https://github.com/beatriceo/polyglot.git
synced 2025-10-25 10:42:11 +00:00
fixed issue where modal trigger broke navbar
This commit is contained in:
11
app/javascript/components/modal.js
Normal file
11
app/javascript/components/modal.js
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
const triggerModalEvent = () => {
|
||||
const btn = document.getElementById("modalTrigger");
|
||||
const modal = document.getElementById("myModal");
|
||||
|
||||
btn.addEventListener('click', function(event) {
|
||||
$('#myModal').modal('show');
|
||||
});
|
||||
}
|
||||
|
||||
export { triggerModalEvent }
|
||||
@@ -1,4 +1,9 @@
|
||||
import "bootstrap";
|
||||
|
||||
import { profilePageAnimation } from '../users/lesson';
|
||||
profilePageAnimation();
|
||||
import { triggerModalEvent } from "../components/modal.js";
|
||||
|
||||
triggerModalEvent();
|
||||
|
||||
// import { profilePageAnimation } from '../users/lesson';
|
||||
|
||||
// profilePageAnimation();
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
import "bootstrap";
|
||||
|
||||
const btn = document.getElementById("modalTrigger");
|
||||
const modal = document.getElementById("myModal");
|
||||
|
||||
btn.addEventListener('click', function(event) {
|
||||
$('#myModal').modal('show');
|
||||
});
|
||||
Reference in New Issue
Block a user