From 22e8438f029b778780461f341a42550177fdbf14 Mon Sep 17 00:00:00 2001 From: rdrew Date: Fri, 9 Jan 2026 12:38:02 -0400 Subject: [PATCH] lang switch --- js/custom.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/js/custom.js b/js/custom.js index d6bfbee..233d291 100644 --- a/js/custom.js +++ b/js/custom.js @@ -1,3 +1,23 @@ (function (Drupal) { //stuff goes here })(Drupal); +(function ($) { + + Drupal.behaviors.ethnographyBehavior = { + 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));