<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">$(function () {
    imgratio()//åˆå§‹åŒ–å›¾ç‰‡ratio

    setTimeout(function () {
        imgratio();
    }, 200)

    $(".ratio-img").each(function (index, element) {
        $(this).attr({ "src": $(this).data("src") });//å›¾ç‰‡é¢„åŠ&nbsp;è½½ 
    });

    //çª—å£æ”¹å˜å¤§å°å›žè°ƒratioï¼›
    var rtime = new Date();
    var timeout = false;
    var delta = 200;
    $(window).resize(function () {
        rtime = new Date();
        if (timeout === false) {
            timeout = true;
            setTimeout(resizeend, delta); //resizeåªå›žè°ƒæœ€åŽä¸€æ¬¡
        }
    });
    function resizeend() {  //window.resizeå›žè°ƒ
        if (new Date() - rtime &lt; delta) {
            setTimeout(resizeend, delta);
        } else {
            timeout = false;
            imgratio()//ratio
        }
    }
    //
})
function imgratio() {//å›¾ç‰‡ ratioæ–¹æ³•è°ƒç”¨
    $(".ratio-img").each(function (index, element) {
        if ($(this).is(":visible")) {
            $(this).css({ height: Math.floor($(this).width() * $(this).data("ratio")) });
        }
    });
}
//æ—&nbsp;å›¾å›¾åƒ
var nullimg = '../images/error.png';
function lod(t) {
    t.onerror = null;
    t.src = nullimg
}
$(function () {
    $(".ratio-img").each(function () {
        if ($(this).attr("src") == "") {
            $(this).attr({ "src": nullimg })
        }
    })
})


</pre></body></html>