JSFiddle - React, Tailwind, and code Playground
by mtenschert
JavaScript
/**
* Get language by client
*/
var initial_help_center_totalPath = window.location.pathname;
var initial_help_center_paths = initial_help_center_totalPath.split("/"); // string to [en, ski-rental, france, ...]
var initial_help_center_paths_lang_country_paths_ready = initial_help_center_paths[2];
var initial_help_center_paths_lang_country = initial_help_center_paths_lang_country_paths_ready.split("-"); // extract page name
var initial_help_center_lang = initial_help_center_paths_lang_country[0];
var lang_for_testing = "de";
/**
* render help center
*/
function render_help_center() {
/**
* create interface Function
*/
function create_interface() {
// close function
// body:not(app-FAQ-detail)
$(".FAQ-detail-close-me").click(function() {
// hide app_FAQ_detail after close me button switch classes
$("app-FAQ-detail").fadeOut();
app_FAQ_detail.addClass('no_active');
app_FAQ_detail.removeClass('active');
});
// for google analytics event
var onload_ga_output = "Helpcenter";
console.log(onload_ga_output);
// click functions for FAQ Main Items to show hidden_container
$("div.FAQ_expand_items").each(function(index) {
$(this).click(function() {
// for google analytics event
var event_translations_area = {
FAQ_Find_Informations: "Helpcenter > FAQ",
FAQ_Contact_Us: "Helpcenter > Contact Form",
FAQ_Immediately_Contact: "Helpcenter > Contact us"
};
var selected_area = $(this).data("name");
var selected_area_ga_output = event_translations_area[selected_area];
console.log(selected_area_ga_output);
// toggle and chevron
$(this).next().fadeToggle(1); // toggle
var chevron = $(this).find("i.right").attr('class'); // var...