| Server IP : 146.59.209.152 / Your IP : 216.73.216.46 Web Server : Apache System : Linux webm005.cluster131.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 User : infrafs ( 43850) PHP Version : 8.2.29 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/infrafs/www/wp-content/plugins/eltd-core/shortcodes/accordions/assets/js/ |
Upload File : |
(function ($) {
'use strict';
var accordions = {};
eltd.modules.accordions = accordions;
accordions.eltdInitAccordions = eltdInitAccordions;
accordions.eltdOnDocumentReady = eltdOnDocumentReady;
$(document).ready(eltdOnDocumentReady);
/*
All functions to be called on $(document).ready() should be in this function
*/
function eltdOnDocumentReady() {
eltdInitAccordions();
}
/**
* Init accordions shortcode
*/
function eltdInitAccordions() {
var accordion = $('.eltd-accordion-holder');
if (accordion.length) {
accordion.each(function () {
var thisAccordion = $(this);
if (thisAccordion.hasClass('eltd-accordion')) {
thisAccordion.accordion({
animate: "swing",
collapsible: true,
active: 0,
icons: "",
heightStyle: "content"
});
}
if (thisAccordion.hasClass('eltd-toggle')) {
var toggleAccordion = $(this),
toggleAccordionTitle = toggleAccordion.find('.eltd-accordion-title'),
toggleAccordionContent = toggleAccordionTitle.next();
toggleAccordion.addClass("accordion ui-accordion ui-accordion-icons ui-widget ui-helper-reset");
toggleAccordionTitle.addClass("ui-accordion-header ui-state-default ui-corner-top ui-corner-bottom");
toggleAccordionContent.addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").hide();
toggleAccordionTitle.each(function () {
var thisTitle = $(this);
thisTitle.on('mouseenter mouseleave', function () {
thisTitle.toggleClass("ui-state-hover");
});
thisTitle.on('click', function () {
thisTitle.toggleClass('ui-accordion-header-active ui-state-active ui-state-default ui-corner-bottom');
thisTitle.next().toggleClass('ui-accordion-content-active').slideToggle(400);
});
});
}
});
}
}
})(jQuery);