Browse Source

filter vis

master
rdrew 3 weeks ago
parent
commit
271cbdf28f
  1. 8
      js/checkbox.js
  2. 72
      js/custom.js

8
js/checkbox.js

@ -14,11 +14,3 @@
'<input type="checkbox" class="form-checkbox form-boolean form-boolean--type-checkbox"/>'; '<input type="checkbox" class="form-checkbox form-boolean form-boolean--type-checkbox"/>';
})(Drupal); })(Drupal);
jQuery( window ).on( "load", function() {
console.log( "window loaded" );
//jQuery(".mirador80").remove();
//jQuery(".mirador104").click();
// jQuery('.mirador104 button.MuiButtonBase-root.MuiIconButton-root').trigger('click');
});

72
js/custom.js

@ -2,23 +2,55 @@
//stuff goes here //stuff goes here
})(Drupal); })(Drupal);
(function ($) {
(function (Drupal) {
Drupal.behaviors.LangSwitchBehavior = { Drupal.behaviors.LangSwitchBehavior = {
attach: function (context, settings) { attach: function (context, settings) {
$("#text-fr").hide(); const textEn = context.querySelector('#text-en');
const textFr = context.querySelector('#text-fr');
$( "#show-text-en" , context).click(function(e) { const showEn = context.querySelector('#show-text-en');
e.preventDefault(); const showFr = context.querySelector('#show-text-fr');
$("#text-en").show();
$("#text-fr").hide(); // Hide French text initially
}); if (textFr) {
$( "#show-text-fr" , context).click(function(e) { textFr.style.display = 'none';
e.preventDefault(); }
$("#text-en").hide();
$("#text-fr").show(); if (showEn && textEn && textFr) {
}); showEn.addEventListener('click', function (e) {
} e.preventDefault();
}; textEn.style.display = '';
textFr.style.display = 'none';
}(jQuery)); });
}
if (showFr && textEn && textFr) {
showFr.addEventListener('click', function (e) {
e.preventDefault();
textEn.style.display = 'none';
textFr.style.display = '';
});
}
}
};
})(Drupal);
//(function ($) {
//Drupal.behaviors.LangSwitchBehavior = {
//attach: function (context, settings) {
//$("#text-fr").hide();
//$( "#show-text-en" , context).click(function(e) {
//e.preventDefault();
//$("#text-en").show();
//$("#text-fr").hide();
//});
//$( "#show-text-fr" , context).click(function(e) {
//e.preventDefault();
//$("#text-en").hide();
//$("#text-fr").show();
//});
//}
//};
//}(jQuery));

Loading…
Cancel
Save