Drupal 8 Site using Vue
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

17 lines
496 B

!function (document, Drupal, $) {
'use strict';
Drupal.behaviors.drupalVueCollapsible = {
attach: function attach(context) {
var collapsibles = context.querySelectorAll('.collapsible-non-vue');
collapsibles.forEach(function (collapsible) {
collapsible.querySelector('.title').addEventListener('click', function (e) {
e.preventDefault();
this.parentElement.classList.toggle('closed');
});
});
}
};
}(document, Drupal, jQuery);