Browse Source

lang switch

master
rdrew 1 day ago
parent
commit
d36a1916b7
  1. 21
      js/custom.js
  2. 20
      js/lang_switch.js

21
js/custom.js

@ -1,3 +1,24 @@
(function (Drupal) {
//stuff goes here
})(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));

20
js/lang_switch.js

@ -1,23 +1,3 @@
(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));

Loading…
Cancel
Save