Optimizing Image Gallery Caption for SEO Ranking

2024-04-26 00:57:50

‘; } else { caption += $(this).find(‘figcaption’).html() + getDetailsURL($(this).parent()) + getDownloadURL($(this).parent()) + showFBShare(); } } else { if (isMobile()) { caption += ‘

‘; } else { caption += ” + ‘

‘ + $(this).find(‘figcaption p’).html() + ‘

‘ + getDetailsURL($(this).parent()) + getDownloadURL($(this).parent()) + showFBShare(); } } return caption; }, afterLoad: function (instance, current) { //initial desktop view $(“.fancybox-caption__body”).addClass(“a2a_kit”).addClass(“a2a_default_style”); if (isMobile()) $(“.fancybox-caption__body”).addClass(“mobile”); }, afterShow: function (instance, current) { var $currentSlide = $(“.fancybox-slide.fancybox-slide–current”).parent().parent(); if (isMobile()) $currentSlide.find(“.fancy-detail-link”).on(“touchstart”, function () { captionToggle(); }); }, afterClose: function () { } })); let debounceTimer; $(window).on(“resize”, function (event) { if (isMobile()) return; if ($(“.af3-caption-body”).length > 0 && $(“.af3-caption – body”).css(“height”) != undefined) { event.stopImmediatePropagation(); $(“.fancybox-caption__body”).removeClass(“half”); isDesktopInit = false; captionToggle(); debounceTimer = setTimeout ( function () { clearTimeout (debounceTimer = null) recalculateImageSize(}, 1000); function recalculateImageSize() { // Fancy box miscalculated due to race conditions with new layout var origImgWth = $(“.fancybox-image”).prop( “naturalWidth”; var origHgt = $(“.fancybox-image”).var winWth = $(window).innerWidth(); var winHgt = $(window).innerHeight() = Math.min(winHgt / origImgHgt); var newImgHgt = (origImgHgt); var dstTop((winHgt – newImgHgt)) = Math.floor((winWth – newImgWth)) / 2; $(“.fancybox-content”).removeAttr(“style”); $(“.fancybox-content”).css(“width”, newImgWth + “px”); $(“.fancybox-content”).css(“height”, newImgHgt + “px”); $(“.fancybox-content”).css(“transform”, “translate(” + dstLeft + “px, ” + dstTop + “px)”); } function captionToggle() { if ($(“.fancybox-caption__body”).hasClass(“af3-caption-body”)) { $(“.af3-caption-body”).stop(true, false).animate ({ height: “0vh” }, 800, function () { // Animation complete. closeDetails(); }); $(“.fancy-photo-detail-link”).html($(“.fancy-photo-detail-link”).html().replace(“CLOSE”, “SHOW”)); } else { $(“.fancybox-caption__body”).addClass(“af3-caption-body”); $(“.af3-caption-body”).addClass(detailSize); $(“.af3-caption-body”).animate({ height: displayhgt }, 800); $(“.fancybox-caption”).addClass(“af3-caption-bg”); $(“.base-caption-info”).addClass(“full-height”); $(“.fancy-photo-detail-link”).addClass(“photo-detail-gradient”); $(“.fancybox-button”).css(“display”, “none”); $(“.fancy-photo-detail-link”).html($(“.fancy-photo-detail-link”).html().replace(“SHOW”, “CLOSE”)); $(“.fancybox-caption__body”).prepend(prependClosing()); $(“.closing-box, .closingx”).on(“touchstart”, function () { captionToggle(); }); } } function getDetailsURL(fbObj) { return ‘DETAILS‘; } function getDownloadURL(fbObj) { return ‘DOWNLOAD‘; } function showFBShare() { return ‘‘; } function closeDetails() { $(“.af3-caption-body”).removeClass(detailSize); $(“.fancybox-caption__body”).removeClass(“af3-caption-body”); $(“.fancybox-caption”).removeClass(“af3-caption-bg”); $(“.base-caption-info”).removeClass(“full-height”); $(“.fancy-photo-detail-link”).removeClass(“photo-detail-gradient”); $(“.fancybox-button”).css(“display”, “block”); if (detailSize === “half”) { detailSize = “full”; displayhgt = “90vh”; $(“.fancybox-caption”).removeClass(“desktop-init”); } } function prependClosing() { return ” } });

1714094616
#Dover #AFB #hosts #foreign #liaison #officer #visit #Dover #Air #Force #Base #News

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.