‘; } else { 标题 += $(this).find(‘figcaption’).html() + getDetailsURL($(this).parent()) + getDownloadURL($(this).parent()) + showFBShare(); } } else { if (isMobile()) { 标题 += ” + ” + ” + ” + ‘
‘ + $(this).find(‘figcaption p’).html() + ‘
‘ + getDetailsURL($(this).parent()) + getDownloadURL($(this).parent()) + showFBShare() + ” + ” + ‘ ‘; } else { 标题 += ” + ‘
‘ + $(this).find(‘figcaption p’).html() + ‘
‘ + getDetailsURL($(this).parent()) + getDownloadURL($(this).parent()) + showFBShare();返回标题; }, afterLoad: function (instance, current) { //初始桌面视图 $(“.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 () { titleToggle(); }); }, afterClose: function () { } }));让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; titleToggle(); debounceTimer = setTimeout(函数 () {clearTimeout(debounceTimer); 重新计算ImageSize() }, 1000); function recalculateImageSize() { // Fancy box 由于新布局的竞争条件而计算错误 var origImgWth = $(“.fancybox-image”).prop(“naturalWidth”); var origImgHgt = $(“.fancybox-image”).prop(“naturalHeight”); var winWth = $(window).innerWidth(); var winHgt = $(window).innerHeight() varratio = Math.min(winWth / origImgWth, winHgt / origImgHgt); var newImgWth = (origImgWth * 比率); var newImgHgt = (origImgHgt * 比率); var dstTop = Math.floor((winHgt – newImgHgt)) / 2; var dstLeft = Math.floor((winWth – newImgWth)) / 2; $(“.fancybox-content”).removeAttr(“样式”); $(“.fancybox-content”).css(“宽度”, newImgWth + “px”); $(“.fancybox-content”).css(“高度”, newImgHgt + “px”); $(“.fancybox-content”).css(“变换”, “翻译(” + dstLeft + “px, ” + dstTop + “px)”); } function titleToggle() { if ($(“.fancybox-caption__body”).hasClass(“af3-caption-body”)) { $(“.af3-caption-body”).stop(true, false).animate ({ height: “0vh” }, 800, function () { // 动画完成。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(“全高”); $(“.fancy-photo-detail-link”).addClass(“照片细节渐变”); $(“.fancybox-button”).css(“显示”, “无”); $(“.fancy-photo-detail-link”).html($(“.fancy-photo-detail-link”).html().replace(“SHOW”, “CLOSE”)); $(“.fancybox-caption__body”).prepend(prependClosing()); $(“.ending-box, .endingx”).on(“touchstart”, function () { titleToggle(); }); } } 函数 getDetailsURL(fbObj) { return ‘细节‘; } 函数 getDownloadURL(fbObj) { return ‘下载‘; } 函数 showFBShare() { 返回 ‘分享‘; } 函数 closeDetails() { $(“.af3-caption-body”).removeClass(detailSize); $(“.fancybox-caption__body”).removeClass(“af3-caption-body”); $(“.fancybox-caption”).removeClass(“af3-caption-bg”); $(“.base-caption-info”).removeClass(“全高”); $(“.fancy-photo-detail-link”).removeClass(“照片细节渐变”); $(“.fancybox-button”).css(“显示”, “块”);如果(detailSize ===“半”){detailSize =“全”;显示hgt =“90vh”; $(“.fancybox-caption”).removeClass(“desktop-init”); } } 函数 prependClosing() { return ” } });
#韩美为自由旗241进行大规模F16空中演习 #太平洋空军 #文章展示
