Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery(document).ready(function ($) {
- if ($(".home-map-container")[0]) {
- function checkMap() {
- if ($(".map-category")[0]) {
- clearInterval(storeTimeInterval);
- $(".firstPopup")
- .detach()
- .appendTo(
- "#progress_map_vue_component>div>div>div:nth-child(10) .map-category-tile"
- );
- $(".secondPopup")
- .detach()
- .appendTo(
- "#progress_map_vue_component>div>div>div:nth-child(9) .map-category-tile"
- );
- $(".thirdPopup")
- .detach()
- .appendTo(
- "#progress_map_vue_component>div>div>div:nth-child(5) .map-category-tile"
- );
- $(".fourthPopup")
- .detach()
- .appendTo(
- "#progress_map_vue_component>div>div>div:nth-child(4) .map-category-tile"
- );
- $(".fifthPopup")
- .detach()
- .appendTo(
- "#progress_map_vue_component>div>div>div:nth-child(1) .map-category-tile"
- );
- $(".sixthPopup")
- .detach()
- .appendTo(
- " #progress_map_vue_component>div>div>div:nth-child(2) .map-category-tile"
- );
- $(".seventhPopup")
- .detach()
- .appendTo(
- "#progress_map_vue_component>div>div>div:nth-child(7) .map-category-tile"
- );
- $(".eighthPopup")
- .detach()
- .appendTo(
- " #progress_map_vue_component>div>div>div:nth-child(6) .map-category-tile"
- );
- $(".ninthPopup")
- .detach()
- .appendTo(
- " #progress_map_vue_component>div>div>div:nth-child(8) .map-category-tile"
- );
- }
- }
- let storeTimeInterval = setInterval(checkMap, 700);
- }
- //
- setTimeout(() => {
- if (jQuery(".map-container").length) {
- jQuery(".map-category-tile").prepend(
- '<i class="fa-regular fa-circle-xmark"></i>'
- );
- }
- }, 500);
- //
- const goToFirstDesiredElement = jQuery(
- ".firstpopupcontainer .goToDesiredElement"
- );
- const goToNextDesiredElement = jQuery(".goToDesiredElement4");
- const goToThirdDesiredElement = jQuery(".goToDesiredElement2");
- const goToFourthDesiredElement = jQuery(".goToDesiredElement5");
- const goTofifthDesiredElement = jQuery(".goToDesiredElement6");
- const goTsixthDesiredElement = jQuery(".goToDesiredElement7");
- const goTseventhDesiredElement = jQuery(".goToDesiredElement8");
- const goToeightDesiredElement = jQuery(".goToDesiredElement3");
- const goToninghtDesiredElement = jQuery(".goToDesiredElement10");
- goToFirstDesiredElement.click(function (e) {
- e.stopPropagation();
- let mapPopup = jQuery("#category-tile-27");
- let bigPopupContainer = jQuery(".firstpopupcontainer");
- let firstPopupOverlay = jQuery(".firstpopup");
- //
- firstPopupOverlay.removeClass("overlay");
- mapPopup.addClass("active");
- bigPopupContainer.removeClass("activeAditionalPopup");
- localStorage.setItem("personMovedFirst", "map-person-moved");
- jQuery(".map-person").addClass(localStorage.getItem("personMovedFirst"));
- });
- goToNextDesiredElement.click(function (e) {
- e.stopPropagation();
- let secondBigPopupContainer = jQuery(".fourthpopupcontainer");
- secondBigPopupContainer.removeClass("activeAditionalPopup");
- jQuery(".fifthpopupcontainer ").removeClass("activeAditionalPopup");
- jQuery(".fourthpopup").removeClass("overlay");
- jQuery(".fifthpopup ").removeClass("overlay");
- localStorage.setItem("personMovedFourth", "map-person-moved4");
- jQuery(".map-person").addClass(localStorage.getItem("personMovedFourth"));
- });
- goToThirdDesiredElement.click(function (e) {
- e.stopPropagation();
- let thirdBigPopupContainer = jQuery(".secondpopupcontainer");
- let thirdMapPopup = jQuery("#category-tile-36");
- thirdMapPopup.addClass("active");
- thirdBigPopupContainer.removeClass("activeAditionalPopup");
- jQuery(".secondpopup").removeClass("overlay");
- localStorage.setItem("personMovedThird", "map-person-moved3");
- jQuery(".map-person").addClass(localStorage.getItem("personMovedThird"));
- });
- goToFourthDesiredElement.click(function (e) {
- e.stopPropagation();
- let fourthBigPopupContainer = jQuery(".sixthpopupcontainer ");
- let fourthMapPopup = jQuery("#category-tile-40");
- fourthMapPopup.addClass("active");
- fourthBigPopupContainer.removeClass("activeAditionalPopup");
- jQuery(".fifthpopup ").removeClass("overlay");
- jQuery(".sixthpopup ").removeClass("overlay");
- localStorage.setItem("personMovedFourth", "map-person-moved6 ");
- jQuery(".map-person").addClass(localStorage.getItem("personMovedFourth"));
- });
- goTofifthDesiredElement.click(function (e) {
- e.stopPropagation();
- let fifthBigPopupContainer = jQuery(".seventhpopupcontainer");
- let fifthMapPopup = jQuery("#category-tile-39");
- fifthMapPopup.addClass("active");
- fifthBigPopupContainer.removeClass("activeAditionalPopup");
- });
- goTofifthDesiredElement.click(function (e) {
- e.stopPropagation();
- let sixthBigPopupContainer = jQuery(".eighthpopupcontainer ");
- let sixthMapPopup = jQuery("#category-tile-34");
- sixthMapPopup.addClass("active");
- sixthBigPopupContainer.removeClass("activeAditionalPopup");
- });
- goTsixthDesiredElement.click(function (e) {
- e.stopPropagation();
- let eightElement = jQuery(".eighthpopup");
- let seventhMapPopupContainer = jQuery(".eighthpopupcontainer");
- let seventhMapPopup = jQuery("#category-tile-34");
- seventhMapPopup.addClass("active");
- seventhMapPopupContainer.removeClass("activeAditionalPopup");
- eightElement.removeClass("overlay");
- localStorage.setItem("personMovedFifth", "map-person-moved7 ");
- jQuery(".map-person").addClass(localStorage.getItem("personMovedFifth"));
- });
- goTseventhDesiredElement.click(function (e) {
- e.stopPropagation();
- let ninthElement = jQuery(".seventhpopup");
- let ninthMapPopupContainer = jQuery(".seventhpopupcontainer");
- let ninthMapPopup = jQuery("#category-tile-35");
- ninthMapPopup.addClass("active");
- ninthMapPopupContainer.removeClass("activeAditionalPopup");
- ninthElement.removeClass("overlay");
- localStorage.setItem("personMovedSixth", "map-person-moved8");
- jQuery(".map-person").addClass(localStorage.getItem("personMovedSixth"));
- });
- goToeightDesiredElement.click(function (e) {
- e.stopPropagation();
- jQuery(".thirdpopup").removeClass("overlay");
- jQuery(".thirdpopupcontainer ").removeClass("activeAditionalPopup");
- jQuery("#category-tile-33").addClass("active");
- localStorage.setItem("personMovedSeventh", "map-person-moved9");
- jQuery(".map-person").addClass(localStorage.getItem("personMovedSeventh"));
- });
- goToninghtDesiredElement.click(function (e) {
- e.stopPropagation();
- jQuery(".fifthpopup ").removeClass("overlay");
- jQuery(".fifthpopupcontainer ").removeClass("activeAditionalPopup");
- jQuery("#category-tile-29").addClass("active");
- localStorage.setItem("personMovedSecond", "map-person-moved2");
- jQuery(".map-person").addClass(localStorage.getItem("personMovedSecond"));
- });
- if ($(".home-map-container")[0]) {
- function checkMap() {
- if ($(".map-category")[0]) {
- clearInterval(storeTimeInterval);
- let completedElements = jQuery(".completed");
- if (completedElements.length >= 10) {
- jQuery(".congratspopup").removeClass("hiddencongrats");
- }
- jQuery(".closecongrats").click(function () {
- jQuery(".congratspopup").addClass("hiddencongrats");
- });
- }
- }
- let storeTimeInterval = setInterval(checkMap, 500);
- }
- jQuery(".goToDesiredElement14").click(function () {
- jQuery(".ninthpopup").removeClass("overlay");
- jQuery(".ninthpopupcontainer").removeClass("activeAditionalPopup");
- jQuery(".congratspopup").removeClass("hiddencongrats");
- jQuery(".closecongrats").click(function () {
- jQuery(".congratspopup").addClass("hiddencongrats");
- });
- });
- //
- $(document).click(function (e) {
- if (
- !$(e.target).hasClass("active") &&
- $(e.target).parents(".map-category").length === 0
- ) {
- $(".map-category-tile").removeClass("active");
- }
- });
- //
- $(document).click(function (e) {
- if (
- !$(e.target).hasClass("activeAditionalPopup") &&
- $(e.target).parents(".popupcontainer").length === 0
- ) {
- $(".firstpopupcontainer ").removeClass("activeAditionalPopup");
- }
- });
- //
- jQuery(".close-button").click(function (e) {
- e.preventDefault();
- jQuery(".popupitems").hide();
- });
- jQuery(".goToLe").click(function (e) {
- e.preventDefault();
- jQuery(".popupitems").hide();
- });
- //
- if (localStorage.getItem("hiddenPopup") == "hidenElement") {
- jQuery(".secondpopupcontainer").addClass("hidenElement");
- }
- //
- if (localStorage.getItem("hidenElementNext") == "hidenElementNext") {
- jQuery(".thirdpopupcontainer").addClass("hidenElementNext");
- }
- //
- if (localStorage.getItem("hidenElementLast") == "hidenElementLast") {
- jQuery(".fourthpopupcontainer").addClass("hidenElementLast");
- }
- //
- jQuery("#menu-item-3246").addClass("bookmarkicon");
- jQuery("#menu-item-3248").addClass("notification fa-solid fa-bell");
- jQuery("#menu-item-3246 a").addClass("notes-as-popupmod");
- //
- var test = jQuery(
- ".notes-container.basic-style #notes-view-container .notes-view-inside-container .note-header .close-button"
- );
- test.click(function () {
- jQuery("#notes-view-container").hide();
- });
- const searchFormHandler = function searchFormHandler() {
- $(".searchresults").toggleClass("activeSearchPopup");
- };
- const closeSearch = function closeSearch() {
- $(".searchresults").removeClass("activeSearchPopup");
- };
- const searchResultsModal = function searchResultsModal(e) {
- e.preventDefault();
- var q = $("#q").val();
- // AJAX request
- $.ajax({
- url: "./search.php",
- type: "post",
- data: {
- q: q,
- },
- success: function (response) {
- // Add response in Modal body
- $(".searchresults__content").html(response);
- },
- });
- };
- const bookmarksPopup = function bookmarksPopup(e) {
- e.preventDefault();
- e.stopPropagation();
- $(".bookmarksContainer").addClass("activeBookMark");
- $(".upperContainer").addClass("overlay");
- };
- const closeBookMarkContainer = function closeBookMarkContainer() {
- $(".bookmarksContainer").removeClass("activeBookMark");
- $(".upperContainer").removeClass("overlay");
- };
- const bookMarkSingle = function bookMarkSingle(e) {
- e.preventDefault();
- e.stopPropagation();
- let favorites = JSON.parse(localStorage.getItem("favItem")) || [];
- let learningElementHeader = jQuery(".leHead");
- let learningElementID = jQuery(".content-container").attr("id");
- let postLink = window.location.href;
- let bookmarkedItem = {
- id: learningElementID,
- titleBookmark: learningElementHeader.html(),
- postLink: postLink,
- };
- bookmarkedItem.fav = true;
- let arr_str = favorites.map(JSON.stringify);
- if (arr_str.includes(JSON.stringify(bookmarkedItem))) {
- let bookMarkSingle = jQuery(".bookMarkSingle");
- bookMarkSingle.removeClass("fav");
- bookMarkSingle.addClass("notfav");
- let retrievedScores = JSON.parse(localStorage.getItem("favItem"));
- retrievedScores = retrievedScores.filter(
- (val) => val.id !== learningElementID
- );
- localStorage.setItem("favItem", JSON.stringify(retrievedScores));
- } else {
- !arr_str.includes(JSON.stringify(bookmarkedItem)) &&
- favorites.push(bookmarkedItem);
- favorites.map(function (element) {
- let bookMarkSingle = jQuery(".bookMarkSingle");
- if (learningElementID === element.id) {
- bookMarkSingle.removeClass("notfav");
- bookMarkSingle.addClass("fav");
- }
- });
- localStorage.setItem("favItem", JSON.stringify(favorites));
- }
- };
- const notification = function notification(e) {
- e.preventDefault();
- e.stopPropagation();
- $(".notificationsnew").addClass("activenotification");
- };
- const closeNotifications = function closeNotifications(e) {
- e.preventDefault();
- e.stopPropagation();
- $(".notificationsnew").removeClass("activenotification");
- };
- const notesaspopup = function notesaspopup(e) {
- e.preventDefault();
- e.stopPropagation();
- jQuery("#notes-view-container").css("display", "flex");
- };
- jQuery("#menu-item-3237 a").click(notesaspopup);
- jQuery(".search-field").click(searchResultsModal);
- jQuery(".searchform").click(searchFormHandler);
- jQuery(".closeSearch").click(closeSearch);
- jQuery(".bookmarkicon").click(bookmarksPopup);
- jQuery(".closeBookMarks").click(closeBookMarkContainer);
- jQuery(".bookMarkSingle").click(bookMarkSingle);
- jQuery(".notification").click(notification);
- jQuery(".closeNotifications").click(closeNotifications);
- //
- $(".home .searchresults ").click(function (e) {
- e.stopPropagation();
- });
- $("body").click(function () {
- $(".search_result").hide();
- });
- //
- setTimeout(() => {
- let favorites19 = JSON.parse(localStorage.getItem("favItem")) || [];
- favorites19.map(function (element) {
- let learningElementID = jQuery(".content-container").attr("id");
- let bookMarkSingle = jQuery(".bookMarkSingle");
- if (learningElementID === element.id) {
- bookMarkSingle.removeClass("notfav");
- bookMarkSingle.addClass("fav");
- }
- }, 100);
- });
- $("#easyPaginate").easyPaginate({
- paginateElement: "div",
- elementsPerPage: 4,
- effect: "slide",
- firstButtonText: "<",
- lastButtonText: ">",
- });
- $(".notificationsnew #easyPaginate2").easyPaginate({
- paginateElement: "div",
- elementsPerPage: 4,
- effect: "slide",
- firstButtonText: "<",
- lastButtonText: ">",
- });
- if (jQuery("#easyPaginate3").length > 0) {
- jQuery(".searchresults #easyPaginate3").easyPaginate({
- paginateElement: "a",
- elementsPerPage: 4,
- effect: "slide",
- firstButtonText: "<",
- lastButtonText: ">",
- });
- }
- var myDiv = jQuery("#notes-view-container > div > div.note-header > button");
- if (myDiv.length > 0) {
- jQuery(myDiv).click(function () {
- jQuery(".notes-as-popup").css("display", "none");
- });
- }
- var existCondition = setInterval(function () {
- if (
- jQuery("#notes-view-container > div > div.note-header > button").length
- ) {
- clearInterval(existCondition);
- const parameters = function parameters() {
- jQuery("#notes-view-container > div > div.note-header > button").click(
- function () {
- jQuery(".notes-as-popup").css("display", "none");
- }
- );
- };
- parameters();
- }
- }, 100);
- jQuery(".formbeinsp form").submit(function (event) {
- let scrolled = false;
- checkForm(title);
- if (link.length != 0) checkForm(link);
- checkSelect(subcategory);
- checkSelect(tagLevel);
- function checkForm(field) {
- if (!field.val()) {
- event.preventDefault();
- higlightField(field);
- if (!scrolled) {
- scrolled = scrollForm(field);
- }
- }
- }
- function checkSelect(field) {
- if (field.val() == "default") {
- event.preventDefault();
- higlightSelect(field);
- if (!scrolled) {
- scrolled = scrollForm(field);
- }
- }
- }
- });
- });
- jQuery(document).ready(function () {
- let existCondition9 = setInterval(function () {
- if (
- jQuery(".postid-3275 .mark-as-complete-button-container button").length >
- 0
- ) {
- clearInterval(existCondition9);
- const parameters = function parameters() {
- jQuery(".postid-3275 .mark-as-complete-button-container button").click(
- function (e) {
- e.stopPropagation();
- e.preventDefault();
- jQuery(".popupitems").show().focus();
- }
- );
- };
- parameters();
- }
- }, 100);
- //
- let existCondition8 = setInterval(function () {
- if (
- jQuery(".postid-3273 .mark-as-complete-button-container button").length >
- 0
- ) {
- clearInterval(existCondition8);
- const parameters = function parameters() {
- jQuery(".postid-3273 .mark-as-complete-button-container button").click(
- function (e) {
- e.stopPropagation();
- e.preventDefault();
- jQuery(".popupitems").show().focus();
- }
- );
- };
- parameters();
- }
- jQuery(".map-category-tile")
- .before()
- .click(function () {
- jQuery(".map-category-tile").removeClass("active");
- });
- }, 100);
- //
- let existCondition7 = setInterval(function () {
- if (
- jQuery(".postid-3272 .mark-as-complete-button-container button").length >
- 0
- ) {
- clearInterval(existCondition7);
- const parameters = function parameters() {
- jQuery(".postid-3272 .mark-as-complete-button-container button").click(
- function (e) {
- e.stopPropagation();
- e.preventDefault();
- jQuery(".popupitems").show().focus();
- }
- );
- };
- parameters();
- }
- jQuery(".map-category-tile")
- .before()
- .click(function () {
- jQuery(".map-category-tile").removeClass("active");
- });
- }, 100);
- //
- let existCondition6 = setInterval(function () {
- if (
- jQuery(".postid-3271 .mark-as-complete-button-container button").length >
- 0
- ) {
- clearInterval(existCondition6);
- const parameters = function parameters() {
- jQuery(".postid-3271 .mark-as-complete-button-container button").click(
- function (e) {
- e.stopPropagation();
- e.preventDefault();
- jQuery(".popupitems").show().focus();
- }
- );
- };
- parameters();
- }
- jQuery(".map-category-tile")
- .before()
- .click(function () {
- jQuery(".map-category-tile").removeClass("active");
- });
- }, 100);
- //
- let existCondition5 = setInterval(function () {
- if (
- jQuery(".postid-2061 .mark-as-complete-button-container button").length >
- 0
- ) {
- clearInterval(existCondition5);
- const parameters = function parameters() {
- jQuery(".postid-2061 .mark-as-complete-button-container button").click(
- function (e) {
- e.stopPropagation();
- e.preventDefault();
- jQuery(".popupitems").show().focus();
- }
- );
- };
- parameters();
- }
- jQuery(".map-category-tile")
- .before()
- .click(function () {
- jQuery(".map-category-tile").removeClass("active");
- });
- }, 100);
- //
- let existCondition4 = setInterval(function () {
- if (
- jQuery(".postid-3274 .mark-as-complete-button-container button").length >
- 0
- ) {
- clearInterval(existCondition4);
- const parameters = function parameters() {
- jQuery(".postid-3274 .mark-as-complete-button-container button").click(
- function (e) {
- e.stopPropagation();
- e.preventDefault();
- jQuery(".popupitems").show().focus();
- }
- );
- };
- parameters();
- }
- jQuery(".map-category-tile")
- .before()
- .click(function () {
- jQuery(".map-category-tile").removeClass("active");
- });
- }, 100);
- //
- //
- let existCondition3 = setInterval(function () {
- if (
- jQuery(".postid-3276 .mark-as-complete-button-container button").length >
- 0
- ) {
- clearInterval(existCondition3);
- const parameters = function parameters() {
- jQuery(".postid-3276 .mark-as-complete-button-container button").click(
- function (e) {
- e.stopPropagation();
- e.preventDefault();
- jQuery(".popupitems").show().focus();
- }
- );
- };
- parameters();
- }
- jQuery(".map-category-tile")
- .before()
- .click(function () {
- jQuery(".map-category-tile").removeClass("active");
- });
- }, 100);
- //
- let existCondition2 = setInterval(function () {
- if (
- jQuery(".postid-3267 .mark-as-complete-button-container button").length >
- 0
- ) {
- clearInterval(existCondition2);
- const parameters = function parameters() {
- jQuery(".postid-3267 .mark-as-complete-button-container button").click(
- function (e) {
- e.stopPropagation();
- e.preventDefault();
- jQuery(".popupitems").show().focus();
- }
- );
- };
- parameters();
- }
- jQuery(".map-category-tile")
- .before()
- .click(function () {
- jQuery(".map-category-tile").removeClass("active");
- });
- }, 100);
- //
- jQuery(document).ready(function () {
- let existCondition = setInterval(function () {
- if (
- jQuery(".postid-3268 .mark-as-complete-button-container button")
- .length > 0
- ) {
- clearInterval(existCondition);
- const parameters2 = function parameters() {
- jQuery(
- ".postid-3268 .mark-as-complete-button-container button"
- ).click(function (e) {
- e.stopPropagation();
- e.preventDefault();
- jQuery(".popupitems").show().focus();
- });
- };
- parameters2();
- }
- jQuery(".map-category-tile")
- .before()
- .click(function () {
- jQuery(".map-category-tile").removeClass("active");
- });
- }, 100);
- var validator = jQuery("#reflectForm").validate();
- jQuery(".reflectarea").keyup(function () {
- var goodLength = validator.element(".reflectarea");
- if (goodLength) {
- jQuery(".submitbutton").removeAttr("disabled");
- } else {
- jQuery(".submitbutton").attr("disabled", "true");
- }
- });
- if (jQuery(".submitbutton").prop("disabled") == true) {
- jQuery(".submitbutton").click(function () {
- jQuery("body").addClass("has-overlay");
- jQuery(".loader2").addClass("activeLoader");
- });
- }
- });
- });
- jQuery(document).ready(function () {
- if (jQuery(".secondelement.current")) {
- jQuery(".popupcontainer__item--firstelement").find("video")[0].pause();
- }
- jQuery(".firstpopup .fa-circle-info").click(function () {
- jQuery(".firstpopupcontainer").addClass("activeAditionalPopup");
- jQuery(".firstpopup ").addClass("overlay");
- jQuery(".popupcontainer__item--firstelement.current")
- .find("video")[0]
- .play();
- });
- jQuery(".secondpopup .fa-circle-info").click(function () {
- jQuery(".secondpopupcontainer").addClass("activeAditionalPopup");
- jQuery(".secondpopup ").addClass("overlay");
- jQuery(".goToDesiredElement2").hide();
- if (jQuery(".secondpopup .secondpopupcontainer").length > 0) {
- setTimeout(function () {
- let index = 1;
- let total = jQuery(
- ".secondpopup .secondpopupcontainer .popupcontainer__item--secondelement"
- ).length;
- let nextButtonPopup = jQuery(
- ".secondpopup .secondpopupcontainer .nextButtonPopup"
- );
- jQuery(nextButtonPopup).on("click", function () {
- let element = jQuery(
- ".secondpopup .secondpopupcontainer .popupcontainer__item--secondelement"
- );
- jQuery(
- ".secondpopup .secondpopupcontainer .popupcontainer__item--secondelement"
- ).removeClass("current");
- if (element.length > 0) {
- jQuery(
- ".secondpopup .secondpopupcontainer .popupcontainer__item--secondelement"
- )
- .eq(index)
- .addClass("current ");
- index = (index + 1) % total;
- let item = jQuery(
- ".secondpopup .secondpopupcontainer .popupcontainer__item--secondelement:nth-child(3)"
- );
- item.hasClass("current");
- if (item.hasClass("current")) {
- jQuery(".goToDesiredElement2").show();
- } else {
- jQuery(".goToDesiredElement2").hide();
- }
- }
- });
- }, 500);
- }
- });
- jQuery(".thirdpopup .fa-circle-info").click(function () {
- jQuery(".thirdpopupcontainer").addClass("activeAditionalPopup");
- jQuery(".thirdpopup ").addClass("overlay");
- if (jQuery(".thirdpopup .thirdpopupcontainer").length > 0) {
- setTimeout(function () {
- let index = 1;
- let total = jQuery(
- ".thirdpopup .thirdpopupcontainer .popupcontainer__item--secondelement"
- ).length;
- let nextButtonPopup = jQuery(
- ".thirdpopup .thirdpopupcontainer .nextButtonPopup"
- );
- jQuery(nextButtonPopup).on("click", function () {
- let element = jQuery(
- ".thirdpopup .thirdpopupcontainer .popupcontainer__item--secondelement"
- );
- jQuery(
- ".thirdpopup .thirdpopupcontainer .popupcontainer__item--secondelement"
- ).removeClass("current");
- if (element.length > 0) {
- jQuery(
- ".thirdpopup .thirdpopupcontainer .popupcontainer__item--secondelement"
- )
- .eq(index)
- .addClass("current ");
- index = (index + 1) % total;
- let item = jQuery(
- ".thirdpopup .thirdpopupcontainer .popupcontainer__item--secondelement:nth-child(2)"
- );
- }
- });
- }, 500);
- }
- });
- jQuery(".fourthpopup .fa-circle-info").click(function () {
- jQuery(".fourthpopup").addClass("overlay");
- jQuery(".fourthpopupcontainer").addClass("activeAditionalPopup");
- if (jQuery(".fourthpopup .fourthpopupcontainer").length > 0) {
- setTimeout(function () {
- let index = 1;
- let total = jQuery(
- ".fourthpopup .fourthpopupcontainer .popupcontainer__item--secondelement"
- ).length;
- let nextButtonPopup = jQuery(
- ".fourthpopup .fourthpopupcontainer .nextButtonPopup"
- );
- jQuery(nextButtonPopup).on("click", function () {
- let element = jQuery(
- ".fourthpopup .fourthpopupcontainer .popupcontainer__item--secondelement"
- );
- jQuery(
- ".fourthpopup .fourthpopupcontainer .popupcontainer__item--secondelement"
- ).removeClass("current");
- if (element.length > 0) {
- jQuery(
- ".fourthpopup .fourthpopupcontainer .popupcontainer__item--secondelement"
- )
- .eq(index)
- .addClass("current ");
- index = (index + 1) % total;
- let item = jQuery(
- ".fourthpopup .fourthpopupcontainer .popupcontainer__item--secondelement:nth-child(2)"
- );
- }
- });
- }, 500);
- }
- });
- jQuery(".fifthpopup .fa-circle-info").click(function () {
- let fifthPopupSlides = function fifthPopupSlides() {
- jQuery(".fifthpopupcontainer").addClass("activeAditionalPopup");
- jQuery(".fifthpopup ").addClass("overlay");
- if (jQuery(".fifthpopup .fifthpopupcontainer").length > 0) {
- setTimeout(function () {
- let index = 1;
- let total = jQuery(
- ".fifthpopup .fifthpopupcontainer .popupcontainer__item--secondelement"
- ).length;
- let nextButtonPopup = jQuery(
- ".fifthpopup .fifthpopupcontainer .nextButtonPopup"
- );
- jQuery(nextButtonPopup).on("click", function () {
- let element = jQuery(
- ".fifthpopup .fifthpopupcontainer .popupcontainer__item--secondelement"
- );
- jQuery(
- ".fifthpopup .fifthpopupcontainer .popupcontainer__item--secondelement"
- ).removeClass("current");
- if (element.length > 0) {
- jQuery(
- ".fifthpopup .fifthpopupcontainer .popupcontainer__item--secondelement"
- )
- .eq(index)
- .addClass("current ");
- index = (index + 1) % total;
- let item = jQuery(
- ".fifthpopup .fifthpopupcontainer .popupcontainer__item--secondelement:nth-child(2)"
- );
- }
- });
- }, 500);
- }
- };
- fifthPopupSlides();
- });
- //
- jQuery(".sixthpopup .fa-circle-info").click(function () {
- jQuery(".sixthpopupcontainer").addClass("activeAditionalPopup");
- jQuery(".sixthpopup ").addClass("overlay");
- if (jQuery(".sixthpopup .sixthpopupcontainer").length > 0) {
- setTimeout(function () {
- let index = 1;
- let total = jQuery(
- ".sixthpopup .sixthpopupcontainer .popupcontainer__item--secondelement"
- ).length;
- let nextButtonPopup = jQuery(
- ".sixthpopup .sixthpopupcontainer .nextButtonPopup"
- );
- jQuery(nextButtonPopup).on("click", function () {
- let element = jQuery(
- ".sixthpopup .sixthpopupcontainer .popupcontainer__item--secondelement"
- );
- jQuery(
- ".sixthpopup .sixthpopupcontainer .popupcontainer__item--secondelement"
- ).removeClass("current");
- if (element.length > 0) {
- jQuery(
- ".sixthpopup .sixthpopupcontainer .popupcontainer__item--secondelement"
- )
- .eq(index)
- .addClass("current ");
- index = (index + 1) % total;
- let item = jQuery(
- ".sixthpopup .sixthpopupcontainer .popupcontainer__item--secondelement:nth-child(2)"
- );
- }
- });
- }, 500);
- }
- });
- //
- jQuery(".seventhpopup .fa-circle-info").click(function () {
- jQuery(".seventhpopupcontainer").addClass("activeAditionalPopup");
- jQuery(".seventhpopup").addClass("overlay");
- if (jQuery(".seventhpopup .seventhpopupcontainer").length > 0) {
- setTimeout(function () {
- let index = 1;
- let total = jQuery(
- ".seventhpopup .seventhpopupcontainer .popupcontainer__item--secondelement"
- ).length;
- let nextButtonPopup = jQuery(
- ".seventhpopup .seventhpopupcontainer .nextButtonPopup"
- );
- jQuery(nextButtonPopup).on("click", function () {
- let element = jQuery(
- ".seventhpopup .seventhpopupcontainer .popupcontainer__item--secondelement"
- );
- jQuery(
- ".seventhpopup .seventhpopupcontainer .popupcontainer__item--secondelement"
- ).removeClass("current");
- if (element.length > 0) {
- jQuery(
- ".seventhpopup .seventhpopupcontainer .popupcontainer__item--secondelement"
- )
- .eq(index)
- .addClass("current ");
- index = (index + 1) % total;
- let item = jQuery(
- ".seventhpopup .seventhpopupcontainer .popupcontainer__item--secondelement:nth-child(2)"
- );
- }
- });
- }, 500);
- }
- });
- //
- jQuery(".eighthpopup .fa-circle-info").click(function () {
- jQuery(".eighthpopupcontainer").addClass("activeAditionalPopup");
- jQuery(".eighthpopup").addClass("overlay");
- if (jQuery(".eighthpopup .eighthpopupcontainer").length > 0) {
- setTimeout(function () {
- let index = 1;
- let total = jQuery(
- ".eighthpopup .eighthpopupcontainer .popupcontainer__item--secondelement"
- ).length;
- let nextButtonPopup = jQuery(
- ".eighthpopup .eighthpopupcontainer .nextButtonPopup"
- );
- jQuery(nextButtonPopup).on("click", function () {
- let element = jQuery(
- ".eighthpopup .eighthpopupcontainer .popupcontainer__item--secondelement"
- );
- jQuery(
- ".eighthpopup .eighthpopupcontainer .popupcontainer__item--secondelement"
- ).removeClass("current");
- if (element.length > 0) {
- jQuery(
- ".eighthpopup .eighthpopupcontainer .popupcontainer__item--secondelement"
- )
- .eq(index)
- .addClass("current ");
- index = (index + 1) % total;
- let item = jQuery(
- ".eighthpopup .eighthpopupcontainer .popupcontainer__item--secondelement:nth-child(2)"
- );
- }
- });
- }, 500);
- }
- });
- //
- //
- jQuery(".ninthpopup .fa-circle-info").click(function () {
- jQuery(".ninthpopupcontainer").addClass("activeAditionalPopup");
- jQuery(".ninthpopup").addClass("overlay");
- if (jQuery(".ninthpopup .ninthpopupcontainer").length > 0) {
- setTimeout(function () {
- let index = 1;
- let total = jQuery(
- ".ninthpopup .ninthpopupcontainer .popupcontainer__item--secondelement"
- ).length;
- let nextButtonPopup = jQuery(
- ".ninthpopup .ninthpopupcontainer .nextButtonPopup"
- );
- jQuery(nextButtonPopup).on("click", function () {
- let element = jQuery(
- ".ninthpopup .ninthpopupcontainer .popupcontainer__item--secondelement"
- );
- jQuery(
- ".ninthpopup .ninthpopupcontainer .popupcontainer__item--secondelement"
- ).removeClass("current");
- if (element.length > 0) {
- jQuery(
- ".ninthpopup .ninthpopupcontainer .popupcontainer__item--secondelement"
- )
- .eq(index)
- .addClass("current ");
- index = (index + 1) % total;
- let item = jQuery(
- ".ninthpopup .ninthpopupcontainer .popupcontainer__item--secondelement:nth-child(2)"
- );
- }
- });
- }, 500);
- }
- });
- //
- jQuery(".closeFirstPopup").click(function () {
- jQuery(".firstpopupcontainer").removeClass("activeAditionalPopup");
- jQuery(".firstpopup ").removeClass("overlay");
- jQuery(".popupcontainer__item--firstelement").find("video")[0].pause();
- jQuery(".popupcontainer__item--firstelement.secondelement")
- .find("video")[0]
- .play();
- jQuery(".popupcontainer__item--firstelement.secondelement ")
- .find("video")[0]
- .pause();
- });
- jQuery(".closeSecondtPopup").click(function (e) {
- e.stopPropagation();
- jQuery(".secondpopupcontainer").removeClass("activeAditionalPopup");
- jQuery(".secondpopup ").removeClass("overlay");
- });
- jQuery(".closeThirdPopup").click(function (e) {
- e.stopPropagation();
- jQuery(".thirdpopupcontainer").removeClass("activeAditionalPopup");
- jQuery(".thirdpopup ").removeClass("overlay");
- });
- jQuery(".closeFourthPopup").click(function (e) {
- e.stopPropagation();
- jQuery(".fourthpopup ").removeClass("overlay");
- jQuery(".fourthpopupcontainer").removeClass("activeAditionalPopup");
- });
- jQuery(".closefifthPopup").click(function (e) {
- e.stopPropagation();
- jQuery(".fifthpopupcontainer").removeClass("activeAditionalPopup");
- jQuery(".fifthpopup ").removeClass("overlay");
- });
- jQuery(".closesixthPopup").click(function (e) {
- e.stopPropagation();
- jQuery(".sixthpopupcontainer").removeClass("activeAditionalPopup");
- jQuery(".sixthpopup ").removeClass("overlay");
- });
- jQuery(".closeseventhPopup").click(function (e) {
- e.stopPropagation();
- jQuery(".seventhpopupcontainer").removeClass("activeAditionalPopup");
- jQuery(".seventhpopup").removeClass("overlay");
- });
- jQuery(".closeeighthPopup").click(function (e) {
- e.stopPropagation();
- jQuery(".eighthpopup ").removeClass("overlay");
- jQuery(".eighthpopupcontainer").removeClass("activeAditionalPopup");
- });
- jQuery(".closeninthPopup").click(function (e) {
- e.stopPropagation();
- jQuery(".ninthpopup ").removeClass("overlay");
- jQuery(".ninthpopupcontainer ").removeClass("activeAditionalPopup");
- });
- });
- jQuery(document).ready(function () {
- jQuery(".closeSearch").on("click", function () {
- jQuery(".search_result").hide();
- });
- if (jQuery(".input_search").val() == "") {
- jQuery(".search_result").hide();
- }
- jQuery(".input_search").on("keyup change", function (e) {
- jQuery(".search_result").show();
- });
- if (jQuery(".popupcontainer").length > 0) {
- setTimeout(function () {
- var index = 1;
- var total = jQuery(".popupcontainer__item--firstelement").length;
- var nextButtonPopup = jQuery(".nextButton");
- jQuery(nextButtonPopup).on("click", function () {
- let element = jQuery(".popupcontainer__item--firstelement");
- jQuery(".popupcontainer__item--firstelement").removeClass("current");
- jQuery(".popupcontainer__item--firstelement.secondelement")
- .find("video")[0]
- .play();
- jQuery(".popupcontainer__item--firstelement").find("video")[0].pause();
- if (element.length > 0) {
- jQuery(".popupcontainer__item--firstelement")
- .eq(index)
- .addClass("current ");
- index = (index + 1) % total;
- let item = jQuery(".popupcontainer__item--firstelement:nth-child(2)");
- item.hasClass("current");
- if (item.hasClass("current")) {
- jQuery(".goToDesiredElement").show();
- } else {
- jQuery(".goToDesiredElement").hide();
- }
- }
- });
- }, 500);
- }
- if (jQuery(".popupcontainer").length > 0) {
- setTimeout(function () {
- var index2 = 1;
- var total2 = jQuery(".popupcontainer__item--firstelement").length;
- var nextButtonPopup2 = jQuery(".backButton");
- jQuery(nextButtonPopup2).on("click", function () {
- let element = jQuery(".popupcontainer__item--firstelement");
- jQuery(".popupcontainer__item--firstelement").removeClass("current");
- if (element.length > 0) {
- jQuery(".popupcontainer__item--firstelement")
- .eq(index2)
- .addClass("current");
- index2 = (index2 - 1) % total2;
- let item = jQuery(".popupcontainer__item--firstelement");
- item.hasClass("current");
- if (item.hasClass("current")) {
- jQuery(".goToDesiredElement").hide();
- }
- }
- });
- }, 500);
- }
- let item2 = jQuery(
- ".popupcontainer__item > .popupcontainer__item--firstelement"
- );
- if (item2.hasClass("current")) {
- jQuery(".backButton").hide();
- } else {
- jQuery(".backButton").show();
- }
- });
- $("#mark_as_complete_vue_component > div > button").click(function () {
- $(".popupitems ").toggleClass("opened");
- });
- $(document).click(function (e) {
- if (
- !$(e.target)
- .parents()
- .andSelf()
- .is("#mark_as_complete_vue_component > div > button")
- ) {
- $(".popupitems ").removeClass("opened");
- }
- });
- $(".popupitems ").click(function (e) {
- e.stopPropagation();
- });
- jQuery(".alertify-notifier .ajs-success").append(`<div class="buttonContainer"
- "><a class="goToMain" href="https://learn2.roche.com/commercial-learning/"
- ">Go landing page</a><a class="goToLe" href=""
- ">Go learning element</a></div>`);
- jQuery(document).ready(function () {
- if (jQuery(".ajs-success").length > 0) {
- jQuery(".alertify-notifier .ajs-success")
- .append(`<div class="buttonContainer"
- "><a class="goToMain" href="https://learn2.roche.com/commercial-learning/"
- ">Go landing page</a><a class="goToLe" href=""
- ">Go learning element</a></div>`);
- if (jQuery(".goToMain").length > 0) {
- jQuery(".goToMain").click(function (e) {
- window.location.hash = "example";
- if (jQuery("body").hasClass("home2")) {
- }
- });
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement