PageSourceSearch

http://www.yawan.com.tw/js/common.js

js yawan.com.tw collected 2026-10-08 23:18:19 UTC 3,336 bytes, 107 lines download raw bytes

1/// <reference path="jquery.min.js" />
2/// <reference path="jquery.scrollUp.min.js" />
3
4//開啟訂房須知LightBox
5var showNoticeLightBox = function () {
6    closeAllLightBox();
7    $("body").css("overflow", "hidden");
8    $(".lightbox.notice").show();
9    $(".lightbox .notice_txt").show();
10    
11};
12//開啟_聯絡我們LightBox
13var showContactLightBox = function () {
14    if (RWDMenu != undefined) {
15        RWDMenu.MainMenuEvent(false);
16    }
17    closeAllLightBox();
18    $("body").css("overflow", "hidden");
19    $(".contact").show();
20};
21
22//關閉所有LightBox
23var closeAllLightBox = function () {
24    $("body").css("overflow", "");
25    $(".lightbox").hide();
26};
27
28var resizeEvent = function () {
29    if (resizeEvent.OriginalWidth == undefined) {
30        resizeEvent.OriginalWidth = $(window).width();
31    }
32
33    if (resizeEvent.OriginalWidth != $(window).width()) {
34        closeAllLightBox();
35        $(".notice_txt").css("display", "none");
36    }
37
38    //手機模式時,訂購須知事件    
39    $(".noticeMO > a").unbind("click").click(function () {
40        $(".notice_txt").slideToggle("slow");
41    });
42
43    if ($(window).width() < 1024) {
44        //手機模式時,選單高度
45        $(".menuBox").css("height", $("body").height());
46        
47        //回至頂端按鈕
48        //$("#scrollUp_arrow").remove();
49        //$.scrollUp({
50        //    "location": "right",
51        //    "image_src": "images/all/arrow_up.png",
52        //    "wait": "100",
53        //    "time": "300"
54        //});
55        
56    } else {
57        //PC模式不需要高度
58        $(".menuBox").css("height", "");
59
60        //回至頂端按鈕移除
61        $("#scrollUp_arrow").remove();
62    }
63};
64resizeEvent.OriginalWidth = undefined;
65
66var eventlightbox = function () {
67    if ($(".eventlightbox").length > 0) {
68        $(".eventlightbox img").unbind("mouseover").mouseover(function () {
69            eventlightbox.CanClose = false;
70        });
71        $(".eventlightbox img").unbind("mouseout").mouseout(function () {
72            eventlightbox.CanClose = true;
73        });
74        $(".eventlightbox.swpmodal-container").unbind("click").click(function () {
75            if (eventlightbox.CanClose)
76                $(".eventlightbox").hide();
77        });
78        $(".eventlightbox.swpmodal-container .caption").unbind("click").click(function () {
79            if ($("#eventUrl").val() != "") {
80                if ($("#IsOpenNewWindows").val() == "False")
81                    location.href = $("#eventUrl").val();
82                else
83                    window.open($("#eventUrl").val());
84            }
85        });
86        $(".eventlightbox").show();
87    }
88};
89eventlightbox.CanClose = true;
90
91$(document).ready(function () {
92
93    //訂房須知_事件綁定
94    $("a.notice").unbind("click").click(showNoticeLightBox);
95    //訂房須知LightBox
96    $(".lightbox.notice .lightboxClose").unbind("click").click(closeAllLightBox);
97    //聯絡我們_事件綁定
98    $("a[contact]").unbind("click").click(showContactLightBox);
99    //聯絡我們LightBox
100    $(".lightbox.contact .lightboxClose").unbind("click").click(closeAllLightBox);
101
102    //活動LightBox
103    eventlightbox();
104
105    resizeEvent();
106    $(window).resize(resizeEvent);
107});

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.