dropdown.js
3 years ago
editor-view.js
6 years ago
grunion-admin.js
3 years ago
grunion-frontend.js
6 years ago
grunion.js
6 years ago
tinymce-plugin-form-button.js
6 years ago
dropdown.js
27 lines
| 1 | jQuery( function ( $ ) { |
| 2 | $( document ).ready( function () { |
| 3 | initializeSelectMenu(); |
| 4 | |
| 5 | const observer = new MutationObserver( () => { |
| 6 | initializeSelectMenu(); |
| 7 | } ); |
| 8 | |
| 9 | observer.observe( document.querySelector( 'body' ), { |
| 10 | childList: true, |
| 11 | subtree: true, |
| 12 | } ); |
| 13 | } ); |
| 14 | |
| 15 | function initializeSelectMenu() { |
| 16 | $( '.contact-form .contact-form-dropdown' ) |
| 17 | .selectmenu( { |
| 18 | classes: { |
| 19 | 'ui-selectmenu-button': 'contact-form-dropdown__button', |
| 20 | 'ui-selectmenu-menu': 'contact-form-dropdown__menu', |
| 21 | }, |
| 22 | } ) |
| 23 | .attr( 'aria-hidden', true ) |
| 24 | .prop( 'tabindex', -1 ); |
| 25 | } |
| 26 | } ); |
| 27 |