load expanded buttons only for contact form
This commit is contained in:
parent
5bd4644c2c
commit
8baaee8810
1 changed files with 20 additions and 18 deletions
|
@ -101,22 +101,24 @@ ButtonExpand.prototype.handleBlur = function () {
|
||||||
|
|
||||||
/* Initialize Hide/Show Buttons */
|
/* Initialize Hide/Show Buttons */
|
||||||
|
|
||||||
window.addEventListener(
|
if (document.querySelector('#contact-form')) {
|
||||||
'load',
|
window.addEventListener(
|
||||||
function () {
|
'load',
|
||||||
var buttons = document.querySelectorAll(
|
function () {
|
||||||
'button[aria-expanded][aria-controls], button.button-without-hint'
|
var buttons = document.querySelectorAll(
|
||||||
);
|
'button[aria-expanded][aria-controls], button.button-without-hint'
|
||||||
var expandButtons = [];
|
);
|
||||||
var formInput = document.querySelector('form input#type');
|
var expandButtons = [];
|
||||||
|
var formInput = document.querySelector('form input#type');
|
||||||
|
|
||||||
buttons.forEach((button) => {
|
buttons.forEach((button) => {
|
||||||
var be = new ButtonExpand(button);
|
var be = new ButtonExpand(button);
|
||||||
be.init();
|
be.init();
|
||||||
expandButtons.push(be);
|
expandButtons.push(be);
|
||||||
});
|
});
|
||||||
expandButtons.forEach((button) => button.setAllButtons(expandButtons));
|
expandButtons.forEach((button) => button.setAllButtons(expandButtons));
|
||||||
expandButtons.forEach((button) => button.setFormInput(formInput));
|
expandButtons.forEach((button) => button.setFormInput(formInput));
|
||||||
},
|
},
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue