PageSourceSearch

https://www.kuai.com.tw/web/js/lightbox_more.js

js kuai.com.tw collected 2026-09-26 10:32:21 UTC 1,835 bytes, 55 lines download raw bytes

1$(function(){
2    function showLightbox(lightboxId) {
3        var lightbox = $("#" + lightboxId);
4        $(".lightboxArea").not(lightbox).hide().removeClass("active"); // 關閉其他燈箱
5        lightbox.show();
6        lightbox.addClass("active");
7        
8        setTimeout(function(){
9            lightbox.find(".lightboxMain").css({
10                'transform':'scale(1)'
11            });
12        }, 300);
13    }
14
15    function hideLightbox(lightboxId) {
16        var lightbox = $("#" + lightboxId);
17        
18        setTimeout(function(){
19            lightbox.hide();
20            lightbox.removeClass("active");
21        }, 300);
22        
23        lightbox.find(".lightboxMain").removeAttr("style");
24    }
25
26    // 預設打開 lightbox01
27    showLightbox("lightbox01");
28
29    $(".lightBoxShow").click(function(e) {
30        var lightboxId = $(this).data("lightbox");
31        showLightbox(lightboxId);
32    });
33
34    $(".lightTextArea .lightboxClose, .lightboxBG").click(function(e) {
35        var lightboxId = $(this).closest(".lightTextArea").attr("id");
36        hideLightbox(lightboxId);
37    });
38
39    // 燈箱內是影片時
40    $(".play_video").click(function(e) {
41        $(".lightboxArea").addClass("video_use"); // 添加影片燈箱的樣式
42        
43        var thisId = $(this).attr("id"); // 取得相對應燈箱區塊的data-url(youtube網址)
44        var youtubeUrl = $('#' + thisId + '_area').attr("data-url"); // →↑
45        var iframeDom = $(youtubeUrl);
46        iframeDom.appendTo($('#' + thisId + '_area')); // 添加iframe到相對應的區塊內
47    });
48
49    $(".lightboxClose, .lightboxBG").click(function(e) {
50        setTimeout(function(){
51            $(".lightboxArea").removeClass("video_use"); // 移除影片燈箱的樣式
52        }, 300);
53        $(".video iframe").remove(); // 移除iframe
54    });
55});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.