2018-01-28 23:22:43 +11:00
|
|
|
//モーダル・ドロップダウンの各種設定
|
2019-05-19 17:39:30 +10:00
|
|
|
$(document).ready(function () {
|
|
|
|
// the "href" attribute of the modal trigger must specify the modal ID that wants to be triggered
|
2020-07-10 15:16:39 +10:00
|
|
|
const modals = document.querySelectorAll('.modal')
|
|
|
|
M.Modal.init(modals, {
|
2019-06-07 02:11:04 +10:00
|
|
|
inDuration: 300,
|
|
|
|
outDuration: 225,
|
|
|
|
constrainWidth: false, // Does not change width of dropdown to that of the activator
|
|
|
|
hover: false, // Activate on hover
|
|
|
|
gutter: 0, // Spacing from edge
|
|
|
|
belowOrigin: false, // Displays dropdown below the button
|
|
|
|
alignment: 'left', // Displays dropdown with edge aligned to the left of button
|
|
|
|
stopPropagation: false
|
2020-07-10 15:16:39 +10:00
|
|
|
})
|
|
|
|
const dropdown = document.querySelectorAll('.modal')
|
|
|
|
M.Dropdown.init(dropdown, {
|
2019-05-19 17:39:30 +10:00
|
|
|
inDuration: 300,
|
|
|
|
outDuration: 225,
|
|
|
|
constrainWidth: false, // Does not change width of dropdown to that of the activator
|
|
|
|
hover: false, // Activate on hover
|
|
|
|
gutter: 0, // Spacing from edge
|
|
|
|
belowOrigin: false, // Displays dropdown below the button
|
|
|
|
alignment: 'left', // Displays dropdown with edge aligned to the left of button
|
|
|
|
stopPropagation: false // Stops event propagation
|
2020-07-10 15:16:39 +10:00
|
|
|
})
|
|
|
|
M.Collapsible.init(document.querySelectorAll('.collapsible'));
|
|
|
|
const videoModal = document.querySelectorAll('#videomodal')
|
|
|
|
M.Modal.init(videoModal, {
|
2019-10-20 21:09:52 +11:00
|
|
|
onCloseEnd: stopVideo
|
2020-07-10 15:16:39 +10:00
|
|
|
})
|
|
|
|
})
|