Nulla dolor lorem
Cras pulvinar enim ut rhoncus faucibus. Cras quis eleifend purus. In quis congue felis, sit amet mollis ligula.
// Function to set the selected language function setSelectedLanguage(lang) { // Update the selected language display $("#selectedFlag").attr("src", $(".option[data-lang='" + lang + "'] img").attr("src")); $("#selectedText").text(lang);
// Hide all contents $(".En, .عربي").hide(); debugger; if (lang === "En") { $(".En").show(); window.location.reload(); lang = "عربي"; //
} else if (lang === "عربي") { $(".عربي").show(); lang = "En"; // }
localStorage.setItem("selectedLanguage", lang); // window.location.reload();
}
// Check if a language is stored in local storage var storedLang = localStorage.getItem("selectedLanguage"); // window.location.reload(); if (storedLang) { setSelectedLanguage(storedLang); // window.location.reload(); } else { // If no language is stored, default to English ("En") setSelectedLanguage("En"); }
$(".selected-language").click(function () { $(".language-options").toggle();
});
$(".option").click(function () { var selectedLang = $(this).data('lang');
// Store the selected language in local storage localStorage.setItem("selectedLanguage", selectedLang);
setSelectedLanguage(selectedLang); $(".language-options").hide(); // window.location.reload(); });
//Code to hide the flag dropdown when click outside the page $(document).on("click", function(event){ var $trigger = $(".selectedLang"); //debugger; var check = event.target.id; if(check === "selectedText" || check ==="selLang" || check==="seloption" || check==="selectedFlag") {
} else{ $(".language-options").hide(); }
});
Cras pulvinar enim ut rhoncus faucibus. Cras quis eleifend purus. In quis congue felis, sit amet mollis ligula.
Phasellus quis risus eu risus eleifend molestie non ac nulla. Nullam et volutpat elit.
Cras quis eleifend purus. In quis congue felis, sit amet mollis ligula.
[vc_row equal_height=”yes” content_placement=”top” css=”.vc_custom_1580203700499{padding-bottom: 30px !important;}”][vc_column css=”.vc_custom_1580063873894{padding-bottom: 20px !important;}”][/vc_column][/vc_row][vc_row css=”.vc_custom_1580203751737{margin-bottom: -20px !important;}”][vc_column width=”5/12″ css=”.vc_custom_1580203840770{padding-bottom: 30px !important;}” offset=”vc_col-lg-4 vc_col-md-5″][vc_column_text css=”.vc_custom_1580203674553{padding-bottom: 30px !important;}”] Rhoncus dolor – semper malesuada ipsumaccumsan mauris id consectetur sem! [/vc_column_text][/vc_column][vc_column width=”7/12″ css=”.vc_custom_1580203834285{padding-bottom: 30px !important;}” offset=”vc_col-lg-8 vc_col-md-7″][vc_column_text css=”.vc_custom_1580203692720{padding-bottom: 30px !important;}”]Phasellus quis risus eu risus eleifend molestie non ac nulla. Nullam et volutpat elit. Fusce auctor…