
FAIR is a non-profit organization dedicated to providing well-documented answers to criticisms of the doctrine, practice, and history of The Church of Jesus Christ of Latter-day Saints.
MikeParker (talk | contribs) No edit summary |
MikeParker (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | |||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
/* Any JavaScript here will be loaded for all users on every page load. */
/* Any JavaScript here will be loaded for all users on every page load. */
// COLLAPSIBLE HEADER - Estilo Wikipedia
$(document).ready(function () {
$(".collapsible-header").each(function () {
var header = $(this);
var content = header.next(".collapsible-content");
if (content.length === 0) return;
// Si comienza abierto según el template
var startsOpen = header.hasClass("open");
// Flecha correcta según estado inicial
var arrow = startsOpen ? "▲" : "▼";
// Insertar flecha al inicio
header.prepend('<span class="collapse-toggle" aria-hidden="true">' + arrow + '</span>');
// Mostrar/ocultar contenido según estado inicial
if (!startsOpen) content.hide();
// Click para expandir/colapsar
header.on("click", function () {
// Alternar visibilidad con animación suave
content.slideToggle(150);
// Alternar clase
header.toggleClass("open");
// Cambiar flecha según estado (sin rotación, solo cambio de símbolo)
var icon = header.hasClass("open") ? "▲" : "▼";
header.find(".collapse-toggle").text(icon);
});
});
});

FAIR is a non-profit organization dedicated to providing well-documented answers to criticisms of the doctrine, practice, and history of The Church of Jesus Christ of Latter-day Saints.
We are a volunteer organization. We invite you to give back.
Donate Now