### Initialize Panzoom for Image Zooming Source: https://docs.cyberark.com/ai/latest/en/content/resources/_topnav/cc_home.htm This JavaScript code initializes the Panzoom library to enable zooming and panning functionality on an element. It requires the Panzoom library to be included. ```javascript /* */ ``` -------------------------------- ### Initialize Panzoom for Interactive Zooming Source: https://docs.cyberark.com/epm/latest/en/content/resources/_topnav/cc_home.htm This JavaScript code initializes the Panzoom library for an element with the ID 'panzoom-element', enabling interactive zooming and panning. It attaches event listeners to zoom in and zoom out buttons. ```javascript /* */ ``` -------------------------------- ### Select Product Menu Item Source: https://docs.cyberark.com/conjur-enterprise/latest/en/content/resources/_topnav/cc_home.htm Selects the appropriate product menu item in the top navigation based on the current page title and subtitle. This script dynamically adds a 'selected' class to the matching menu item. ```javascript /**/ ``` -------------------------------- ### Main Menu Selection Logic Source: https://docs.cyberark.com/ispss-deployment/latest/en/content/resources/_topnav/cc_home.htm This JavaScript code snippet dynamically selects menu items in the main navigation based on header title and subtitle variables. It ensures the correct product or section is highlighted. ```javascript /* */ ``` -------------------------------- ### Pan and Zoom Functionality Source: https://docs.cyberark.com/cloud-visibility/latest/en/content/resources/_topnav/cc_home.htm Initializes pan and zoom functionality for an element using the Panzoom library. It sets up event listeners for zoom in and zoom out buttons. ```javascript /* */ ``` -------------------------------- ### Dynamically Select Product Menu Item Source: https://docs.cyberark.com/remote-access-standard/latest/en/content/resources/_topnav/cc_home.htm This JavaScript code, executed on document ready, dynamically selects a product menu item based on header title and subtitle variables. It's used for highlighting the current product in the navigation. ```javascript /* */ ``` -------------------------------- ### Dynamic 'In this Topic' Menu Generation Source: https://docs.cyberark.com/ispss-deployment/latest/en/content/resources/_topnav/cc_home.htm Generates 'In this Topic' navigation menus (both main and in-page) based on H2 headings in the document. Includes logic for tooltips and active link highlighting as the user scrolls. ```javascript $(function () { var mtw = document.querySelector('.mtp-wrapper'); var mth = document.querySelector('.mtp-heading'); var mti = document.querySelector('.mtp-items'); var inw = document.querySelector('.ipn-wrapper'); var ini = document.querySelector('.ipn-items'); var idl = 'h2-item-'; var idc = 0; var h2 = document.querySelectorAll('h2'); h2 = []; // 14.1.19: Disable "In this topic" if (h2.length) { var e, f, h, a; for (var i = 0; i < h2.length; i++) { if (h2[i].id.length) h2[i].setAttribute('data-id', h2[i].id); h2[i].id = idl + idc++; h = h2[i].innerText || h2[i].textContent; e = document.createElement('LI'); e.innerHTML = '' + h + ''; mti.appendChild(e); f = document.createElement('LI'); f.innerHTML = '' + h + ''; ini.appendChild(f); } var h1 = document.querySelector('h1'); h1.parentNode.insertBefore(mtw, h1.nextSibling); mtw.style.display = 'block'; $('.ipn-items a span') .on('mouseenter', function () { var $this = $(this); $this.off('mouseenter'); if (this.offsetWidth < this.scrollWidth && !$this.parent().attr('title')) $this.parent().attr('title', $this.parent().text()); }); $("h2:in-viewport:first").each(function () { $('.ipn-items li a[href$=' + this.id + ']') .addClass('active').parent().siblings().children().first().removeClass('active'); }); } else { mtw.parentNode.removeChild(mtw); ini.parentNode.removeChild(ini); } ini.parentNode.removeChild(ini); setTimeout(function() { var ipnScrollMin = 200; if ($(window).scrollTop() >= ipnScrollMin) $('.ipn-wrapper').addClass('show'); $(window).scroll(function () { if ($(window).scrollTop() >= ipnScrollMin) $('.ipn-wrapper').addClass('show'); else $('.ipn-wrapper').removeClass('show'); $("h2:in-viewport:first").each(function () { $('.ipn-items li a[href$=' + this.id + ']') .addClass('active').parent().siblings().children().first().removeClass('active'); }); $(window).resize(function () { if ($(window).scrollTop() >= ipnScrollMin) $('.ipn-wrapper').addClass('show'); else $('.ipn-wrapper').removeClass('show'); }); }); }, 500); }); ``` -------------------------------- ### Handle Feedback and Support Emails Source: https://docs.cyberark.com/audit/latest/en/content/resources/_topnav/cc_home.htm This JavaScript code dynamically updates email links for feedback and support based on variables found in the HTML. It's used to ensure correct email addresses are displayed and linked. ```javascript /* */ ``` -------------------------------- ### Image Zoom and Pan Functionality Source: https://docs.cyberark.com/identity-compliance/latest/en/content/resources/_topnav/cc_home.htm This JavaScript code initializes a panzoom instance for an HTML element, enabling zoom-in and zoom-out functionality for images or diagrams. It attaches event listeners to zoom buttons. ```javascript /* */ ``` -------------------------------- ### Generate Table of Contents (JavaScript) Source: https://docs.cyberark.com/wpm/latest/en/content/resources/_topnav/cc_home.htm Generates 'In this topic' and 'In this page' navigation menus based on H2 headings in the document. It dynamically creates links and adds active states based on viewport visibility. Includes a tooltip for menu items with ellipsis. ```javascript $(function () { var mtw = document.querySelector('.mtp-wrapper'); var mth = document.querySelector('.mtp-heading'); var mti = document.querySelector('.mtp-items'); var inw = document.querySelector('.ipn-wrapper'); var ini = document.querySelector('.ipn-items'); var idl = 'h2-item-'; var idc = 0; var h2 = document.querySelectorAll('h2'); h2 = []; // 14.1.19: Disable "In this topic" if (h2.length) { var e, f, h, a; for (var i = 0; i < h2.length; i++) { if (h2[i].id.length) h2[i].setAttribute('data-id', h2[i].id); h2[i].id = idl + idc++; h = h2[i].innerText || h2[i].textContent; e = document.createElement('LI'); e.innerHTML = '' + h + ''; mti.appendChild(e); f = document.createElement('LI'); f.innerHTML = '' + h + ''; ini.appendChild(f); } var h1 = document.querySelector('h1'); h1.parentNode.insertBefore(mtw, h1.nextSibling); mtw.style.display = 'block'; // Add tooltip for ipn menu items with ellipsis $('.ipn-items a span') .on('mouseenter', function () { var $this = $(this); $this.off('mouseenter'); if (this.offsetWidth < this.scrollWidth && !$this.parent().attr('title')) $this.parent().attr('title', $this.parent().text()); }); $( ``` ```javascript h2:in-viewport:first").each(function () { $('.ipn-items li a[href$=' + this.id + ']') .addClass('active').parent().siblings().children().first().removeClass('active'); }); } else { mtw.parentNode.removeChild(mtw); ini.parentNode.removeChild(ini); } ini.parentNode.removeChild(ini); setTimeout(function() { var ipnScrollMin = 200; if ($(window).scrollTop() >= ipnScrollMin) $('.ipn-wrapper').addClass('show'); $(window).scroll(function () { if ($(window).scrollTop() >= ipnScrollMin) $('.ipn-wrapper').addClass('show'); else $('.ipn-wrapper').removeClass('show'); $( ``` ```javascript h2:in-viewport:first").each(function () { $('.ipn-items li a[href$=' + this.id + ']') .addClass('active').parent().siblings().children().first().removeClass('active'); }); $(window).resize(function () { if ($(window).scrollTop() >= ipnScrollMin) $('.ipn-wrapper').addClass('show'); else $('.ipn-wrapper').removeClass('show'); }); }); }, 500); }); ``` -------------------------------- ### Dynamic Email and Link Handling Source: https://docs.cyberark.com/ispss-deployment/latest/en/content/resources/_topnav/cc_home.htm This JavaScript code dynamically sets email addresses and link URLs based on variables retrieved from the page's top navigation utilities. It's used for feedback and support links. ```javascript /* */ ``` -------------------------------- ### Configure Support Email Link Source: https://docs.cyberark.com/remote-access-standard/latest/en/content/resources/_topnav/cc_home.htm This JavaScript code dynamically sets the support email address for a link. It retrieves the email from a variable and updates the 'href' attribute of the support email element. ```javascript /* */ ``` -------------------------------- ### Dynamic Menu Item Selection Source: https://docs.cyberark.com/cloud-visibility/latest/en/content/resources/_topnav/cc_home.htm Selects menu items in the main navigation based on 'header-title' and 'header-subtitle' variables. It adds a 'selected' class to the matching menu item. ```javascript /* */ ``` -------------------------------- ### Dynamic Support Email Link Source: https://docs.cyberark.com/identity-flows/latest/en/content/resources/_topnav/cc_home.htm Updates the 'href' attribute of a support email link with a dynamically retrieved email address. This script ensures the support link directs to the correct email. ```javascript /* */ ``` -------------------------------- ### Document Ready Function Source: https://docs.cyberark.com/ispss-deployment/latest/en/content/resources/_topnav/cc_home.htm This JavaScript code snippet ensures that the enclosed functions are executed only after the Document Object Model (DOM) is fully loaded and ready. ```javascript /* */ ``` -------------------------------- ### JavaScript for Feedback Email and Support Link Source: https://docs.cyberark.com/privilege-cloud-shared-services/latest/en/content/resources/_topnav/cc_home.htm This JavaScript code dynamically sets the feedback email address and support link based on variables defined in the page's top navigation utility. It's used to configure email and link attributes. ```javascript var feedbackEmail = TopNav.utils.getVar('#var-feedback-email'); var onclickHandler = $('#cc-feedback-email').attr('onclick').replace('FEEDBACK_EMAIL', feedbackEmail); $('#cc-feedback-email').attr('onclick', onclickHandler); var supportEmail = TopNav.utils.getVar('#var-support-email'); var href = $('#cc-support-email').attr('href').replace('SUPPORT_EMAIL', supportEmail); $('#cc-support-email').attr('href', href); ``` -------------------------------- ### Dynamic Product Menu Selection Source: https://docs.cyberark.com/identity-compliance/latest/en/content/resources/_topnav/cc_home.htm This JavaScript code dynamically selects an item in the product menu based on the current page title or subtitle. It appends the menu to the off-canvas content layout. ```javascript /* */ ``` -------------------------------- ### Dynamic Table of Contents Generation with jQuery Source: https://docs.cyberark.com/ispss-access/latest/en/content/resources/_topnav/cc_home.htm Generates a dynamic 'In this topic' table of contents based on H2 headings in the document. It adds IDs to headings and creates corresponding list items with links. Includes logic for highlighting the active section in the 'In this topic' menu as the user scrolls. ```javascript $(function () { var mtw = document.querySelector('.mtp-wrapper'); var mth = document.querySelector('.mtp-heading'); var mti = document.querySelector('.mtp-items'); var inw = document.querySelector('.ipn-wrapper'); var ini = document.querySelector('.ipn-items'); var idl = 'h2-item-'; var idc = 0; var h2 = document.querySelectorAll('h2'); h2 = []; // 14.1.19: Disable "In this topic" if (h2.length) { var e, f, h, a; for (var i = 0; i < h2.length; i++) { if (h2[i].id.length) h2[i].setAttribute('data-id', h2[i].id); h2[i].id = idl + idc++; h = h2[i].innerText || h2[i].textContent; e = document.createElement('LI'); e.innerHTML = '' + h + ''; mti.appendChild(e); f = document.createElement('LI'); f.innerHTML = '' + h + ''; ini.appendChild(f); } var h1 = document.querySelector('h1'); h1.parentNode.insertBefore(mtw, h1.nextSibling); mtw.style.display = 'block'; // Add tooltip for ipn menu items with ellipsis $('.ipn-items a span') .on('mouseenter', function () { var $this = $(this); $this.off('mouseenter'); if (this.offsetWidth < this.scrollWidth && !$this.parent().attr('title')) $this.parent().attr('title', $this.parent().text()); }); $( ``` ```javascript $("h2:in-viewport:first").each(function () { $('.ipn-items li a[href$=' + this.id + ']') .addClass('active').parent().siblings().children().first().removeClass('active'); }); } else { mtw.parentNode.removeChild(mtw); ini.parentNode.removeChild(ini); } ini.parentNode.removeChild(ini); setTimeout(function() { var ipnScrollMin = 200; if ($(window).scrollTop() >= ipnScrollMin) $('.ipn-wrapper').addClass('show'); $(window).scroll(function () { if ($(window).scrollTop() >= ipnScrollMin) $('.ipn-wrapper').addClass('show'); else $('.ipn-wrapper').removeClass('show'); $( ``` ```javascript $("h2:in-viewport:first").each(function () { $('.ipn-items li a[href$=' + this.id + ']') .addClass('active').parent().siblings().children().first().removeClass('active'); }); $(window).resize(function () { if ($(window).scrollTop() >= ipnScrollMin) $('.ipn-wrapper').addClass('show'); else $('.ipn-wrapper').removeClass('show'); }); }); }); /*]]>*/ ``` -------------------------------- ### Update Main Menu Product Selection Source: https://docs.cyberark.com/ai/latest/en/content/resources/_topnav/cc_home.htm This JavaScript code updates the main menu to highlight the selected product based on page title and subtitle variables. It's used for navigation and user interface feedback. ```javascript /* */ ``` -------------------------------- ### Dynamic Table of Contents Generation Source: https://docs.cyberark.com/identity/latest/en/content/resources/_topnav/cc_home.htm Generates a dynamic table of contents for a page based on H2 headings. It creates navigation links for both a main topic menu and an in-page navigation menu. This script is intended for use within a specific page structure. ```javascript $(function () { var mtw = document.querySelector('.mtp-wrapper'); var mth = document.querySelector('.mtp-heading'); var mti = document.querySelector('.mtp-items'); var inw = document.querySelector('.ipn-wrapper'); var ini = document.querySelector('.ipn-items'); var idl = 'h2-item-'; var idc = 0; var h2 = document.querySelectorAll('h2'); h2 = []; // 14.1.19: Disable "In this topic" if (h2.length) { var e, f, h, a; for (var i = 0; i < h2.length; i++) { if (h2[i].id.length) h2[i].setAttribute('data-id', h2[i].id); h2[i].id = idl + idc++; h = h2[i].innerText || h2[i].textContent; e = document.createElement('LI'); e.innerHTML = '' + h + ''; mti.appendChild(e); f = document.createElement('LI'); f.innerHTML = '' + h + ''; ini.appendChild(f); } var h1 = document.querySelector('h1'); h1.parentNode.insertBefore(mtw, h1.nextSibling); mtw.style.display = 'block'; // Add tooltip for ipn menu items with ellipsis $('.ipn-items a span') .on('mouseenter', function () { var $this = $(this); $this.off('mouseenter'); if (this.offsetWidth < this.scrollWidth && !$this.parent().attr('title')) $this.parent().attr('title', $this.parent().text()); }); $("h2:in-viewport:first").each(function () { $('.ipn-items li a[href$=' + this.id + ']') .addClass('active').parent().siblings().children().first().removeClass('active'); }); } else { mtw.parentNode.removeChild(mtw); ini.parentNode.removeChild(ini); } ini.parentNode.removeChild(ini); setTimeout(function() { var ipnScrollMin = 200; if ($(window).scrollTop() >= ipnScrollMin) $('.ipn-wrapper').addClass('show'); $(window).scroll(function () { if ($(window).scrollTop() >= ipnScrollMin) $('.ipn-wrapper').addClass('show'); else $('.ipn-wrapper').removeClass('show'); $("h2:in-viewport:first").each(function () { $('.ipn-items li a[href$=' + this.id + ']') .addClass('active').parent().siblings().children().first().removeClass('active'); }); $(window).resize(function () { if ($(window).scrollTop() >= ipnScrollMin) $('.ipn-wrapper').addClass('show'); else $('.ipn-wrapper').removeClass('show'); }); }); }, 500); }); ``` -------------------------------- ### Select Product in Top Navigation Source: https://docs.cyberark.com/cyberark-blueprint/latest/en/content/resources/_topnav/cc_home.htm This JavaScript snippet dynamically selects the current product in the top navigation menu based on title and subtitle variables. It appends the menu to the off-canvas content. ```javascript /* */ ``` -------------------------------- ### Select Product Menu Item Source: https://docs.cyberark.com/audit/latest/en/content/resources/_topnav/cc_home.htm This JavaScript code, using jQuery, selects the appropriate product menu item based on the page title and subtitle. It's designed to highlight the current product within the navigation menu. ```javascript /* */ ``` -------------------------------- ### Update Feedback and Support Email Links Source: https://docs.cyberark.com/epm/latest/en/content/resources/_topnav/cc_home.htm This JavaScript code snippet dynamically updates the 'mailto:' links for feedback and support emails using variables retrieved from the DOM. It ensures that the correct email addresses are used when the links are clicked. ```javascript /* */ ``` -------------------------------- ### jQuery Viewport Utilities Source: https://docs.cyberark.com/identity/latest/en/content/resources/_topnav/cc_home.htm Extends jQuery with functions to check if an element is below the fold, above the top, left of screen, right of screen, or in the viewport. Useful for lazy loading or dynamic content adjustments based on visibility. ```javascript /*= $(element).offset().top + $(element).height() - settings.threshold; }; $.rightofscreen = function (element, settings) { var fold = $(window).width() + $(window).scrollLeft(); return fold <= $(element).offset().left - settings.threshold; }; $.leftofscreen = function (element, settings) { var left = $(window).scrollLeft(); return left >= $(element).offset().left + $(element).width() - settings.threshold; }; $.inviewport = function (element, settings) { return !$.rightofscreen(element, settings) && !$.leftofscreen(element, settings) && !$.belowthefold(element, settings) && !$.abovethetop(element, settings); }; $.extend($.expr[':'], { "below-the-fold": function (a, i, m) { return $.belowthefold(a, { threshold: 0 }); }, "above-the-top": function (a, i, m) { return $.abovethetop(a, { threshold: 0 }); }, "left-of-screen": function (a, i, m) { return $.leftofscreen(a, { threshold: 0 }); }, "right-of-screen": function (a, i, m) { return $.rightofscreen(a, { threshold: 0 }); }, "in-viewport": function (a, i, m) { return $.inviewport(a, { threshold: 0 }); } }); })(jQuery); /*]]>*/ ``` -------------------------------- ### Top Navigation Menu Script Source: https://docs.cyberark.com/sws/latest/en/content/resources/_topnav/cc_home.htm This JavaScript code snippet is used to dynamically select menu items in the top navigation based on the current page title and subtitle. It's typically used for highlighting the active product or section. ```javascript /* */ ``` -------------------------------- ### Append Language Selector to Layout Source: https://docs.cyberark.com/remote-access-standard/latest/en/content/resources/_topnav/cc_home.htm This JavaScript code, executed on document ready, appends the language selection menu to the title bar layout. This is typically used for handling multi-language support in the UI. ```javascript /* */ ``` -------------------------------- ### Append Language Menu Source: https://docs.cyberark.com/audit/latest/en/content/resources/_topnav/cc_home.htm This JavaScript code appends the language selection menu to the specified layout container. It's part of the dynamic menu management for the user interface. ```javascript /* */ ``` -------------------------------- ### jQuery Viewport Detection Utilities Source: https://docs.cyberark.com/ispss-deployment/latest/en/content/resources/_topnav/cc_home.htm Provides jQuery functions to detect if an element is below the fold, above the top, left of screen, right of screen, or in the viewport. Useful for lazy loading or conditional rendering. ```javascript (function ($) { $.belowthefold = function (element, settings) { var fold = $(window).height() + $(window).scrollTop(); return fold <= $(element).offset().top - settings.threshold; }; $.abovethetop = function (element, settings) { var top = $(window).scrollTop(); return top >= $(element).offset().top + $(element).height() - settings.threshold; }; $.rightofscreen = function (element, settings) { var fold = $(window).width() + $(window).scrollLeft(); return fold <= $(element).offset().left - settings.threshold; }; $.leftofscreen = function (element, settings) { var left = $(window).scrollLeft(); return left >= $(element).offset().left + $(element).width() - settings.threshold; }; $.inviewport = function (element, settings) { return !$.rightofscreen(element, settings) && !$.leftofscreen(element, settings) && !$.belowthefold(element, settings) && !$.abovethetop(element, settings); }; $.extend($.expr[':'], { "below-the-fold": function (a, i, m) { return $.belowthefold(a, { threshold: 0 }); }, "above-the-top": function (a, i, m) { return $.abovethetop(a, { threshold: 0 }); }, "left-of-screen": function (a, i, m) { return $.leftofscreen(a, { threshold: 0 }); }, "right-of-screen": function (a, i, m) { return $.rightofscreen(a, { threshold: 0 }); }, "in-viewport": function (a, i, m) { return $.inviewport(a, { threshold: 0 }); } }); })(jQuery); ``` -------------------------------- ### Language Menu Append Source: https://docs.cyberark.com/cloud-visibility/latest/en/content/resources/_topnav/cc_home.htm Appends the language selection menu to the off-canvas content area. This is typically used for mobile or responsive views. ```javascript /* */ ``` -------------------------------- ### Append Language Menu to Off-Canvas Content Source: https://docs.cyberark.com/ispss-deployment/latest/en/content/resources/_topnav/cc_home.htm Appends the language menu to the off-canvas content area in the UI. ```javascript $(function () { $('.cc-main-menu.language') .appendTo($('.off-canvas-content .title-bar-layout')); }); ``` -------------------------------- ### Highlight Selected Product Menu Item Source: https://docs.cyberark.com/epm/latest/en/content/resources/_topnav/cc_home.htm This JavaScript code snippet, using jQuery, highlights the selected product menu item in the navigation bar. It retrieves the current product title and subtitle from variables and adds a 'selected' class to the corresponding menu item. ```javascript /* */ ``` -------------------------------- ### Dynamic Table of Contents Generation Source: https://docs.cyberark.com/cyberark-blueprint/latest/en/content/resources/_topnav/cc_home.htm Generates a dynamic table of contents for a page based on H2 headings. It adds 'In this topic' and 'In this page' navigation elements. ```javascript $(function () { var mtw = document.querySelector('.mtp-wrapper'); var mth = document.querySelector('.mtp-heading'); var mti = document.querySelector('.mtp-items'); var inw = document.querySelector('.ipn-wrapper'); var ini = document.querySelector('.ipn-items'); var idl = 'h2-item-'; var idc = 0; var h2 = document.querySelectorAll('h2'); h2 = []; // 14.1.19: Disable "In this topic" if (h2.length) { var e, f, h, a; for (var i = 0; i < h2.length; i++) { if (h2[i].id.length) h2[i].setAttribute('data-id', h2[i].id); h2[i].id = idl + idc++; h = h2[i].innerText || h2[i].textContent; e = document.createElement('LI'); e.innerHTML = '' + h + ''; mti.appendChild(e); f = document.createElement('LI'); f.innerHTML = '' + h + ''; ini.appendChild(f); } var h1 = document.querySelector('h1'); h1.parentNode.insertBefore(mtw, h1.nextSibling); mtw.style.display = 'block'; // Add tooltip for ipn menu items with ellipsis $('.ipn-items a span') .on('mouseenter', function () { var $this = $(this); $this.off('mouseenter'); if (this.offsetWidth < this.scrollWidth && !$this.parent().attr('title')) $this.parent().attr('title', $this.parent().text()); }); $( ``` ```javascript h2:in-viewport:first").each(function () { $('.ipn-items li a[href$=' + this.id + ']') .addClass('active').parent().siblings().children().first().removeClass('active'); }); } else { mtw.parentNode.removeChild(mtw); ini.parentNode.removeChild(ini); } ini.parentNode.removeChild(ini); setTimeout(function() { var ipnScrollMin = 200; if ($(window).scrollTop() >= ipnScrollMin) $('.ipn-wrapper').addClass('show'); $(window).scroll(function () { if ($(window).scrollTop() >= ipnScrollMin) $('.ipn-wrapper').addClass('show'); else $('.ipn-wrapper').removeClass('show'); $( ``` ```javascript h2:in-viewport:first").each(function () { $('.ipn-items li a[href$=' + this.id + ']') .addClass('active').parent().siblings().children().first().removeClass('active'); }); $(window).resize(function () { if ($(window).scrollTop() >= ipnScrollMin) $('.ipn-wrapper').addClass('show'); else $('.ipn-wrapper').removeClass('show'); }); }); }, 500); }); /*]]>*/ ``` -------------------------------- ### Dynamic Email Link Update Source: https://docs.cyberark.com/cloud-visibility/latest/en/content/resources/_topnav/cc_home.htm Updates the 'onclick' attribute for a feedback email link and the 'href' attribute for a support email link using variables obtained from the page. This ensures the correct email addresses are used. ```javascript /* */ ``` -------------------------------- ### Update Support Email Link Source: https://docs.cyberark.com/pam-self-hosted/latest/en/content/resources/_topnav/cc_home.htm This JavaScript code updates the 'href' attribute of a support email link. It retrieves a support email address using a utility function and replaces a placeholder in the link's URL. ```javascript /* */ ``` -------------------------------- ### Append Language Menu to Top Navigation Source: https://docs.cyberark.com/cyberark-blueprint/latest/en/content/resources/_topnav/cc_home.htm This JavaScript snippet appends the language selection menu to the off-canvas content area within the top navigation layout. It is typically used for language switching functionality. ```javascript /* */ ``` -------------------------------- ### jQuery Below the Fold Utility Functions Source: https://docs.cyberark.com/ispss-access/latest/en/content/resources/_topnav/cc_home.htm Provides utility functions to check if an element is below the fold, above the top, left of screen, right of screen, or in the viewport using jQuery. Useful for lazy loading or visibility-based actions. ```javascript /*= $(element).offset().top + $(element).height() - settings.threshold; }; $.rightofscreen = function (element, settings) { var fold = $(window).width() + $(window).scrollLeft(); return fold <= $(element).offset().left - settings.threshold; }; $.leftofscreen = function (element, settings) { var left = $(window).scrollLeft(); return left >= $(element).offset().left + $(element).width() - settings.threshold; }; $.inviewport = function (element, settings) { return !$.rightofscreen(element, settings) && !$.leftofscreen(element, settings) && !$.belowthefold(element, settings) && !$.abovethetop(element, settings); }; $.extend($.expr[':'], { "below-the-fold": function (a, i, m) { return $.belowthefold(a, { threshold: 0 }); }, "above-the-top": function (a, i, m) { return $.abovethetop(a, { threshold: 0 }); }, "left-of-screen": function (a, i, m) { return $.leftofscreen(a, { threshold: 0 }); }, "right-of-screen": function (a, i, m) { return $.rightofscreen(a, { threshold: 0 }); }, "in-viewport": function (a, i, m) { return $.inviewport(a, { threshold: 0 }); } }); })(jQuery); /*]]>*/ ``` -------------------------------- ### Append Language Menu to Layout Source: https://docs.cyberark.com/ai/latest/en/content/resources/_topnav/cc_home.htm This JavaScript code appends the language menu to the title bar layout within the off-canvas content. It's typically used for managing language selection in the UI. ```javascript /* */ ``` -------------------------------- ### Append Language Selector to Layout Source: https://docs.cyberark.com/epm/latest/en/content/resources/_topnav/cc_home.htm This JavaScript code snippet, using jQuery, appends the language selection menu to the specified layout area. It targets elements with the class 'cc-main-menu language' and moves them to the 'off-canvas-content .title-bar-layout'. ```javascript /* */ ``` -------------------------------- ### Update Feedback Email Link Source: https://docs.cyberark.com/pam-self-hosted/latest/en/content/resources/_topnav/cc_home.htm This JavaScript snippet dynamically updates the 'onclick' attribute of a feedback email link using a variable retrieved from the page's top navigation utilities. It replaces a placeholder with the actual feedback email address. ```javascript /* */ ``` -------------------------------- ### Update Feedback Email Link Source: https://docs.cyberark.com/ai/latest/en/content/resources/_topnav/cc_home.htm This JavaScript code dynamically updates the 'onclick' attribute of a feedback email link using a variable retrieved from the page. It ensures the correct feedback email address is used. ```javascript /* */ ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.