PageSourceSearch

https://sciencepark.or.th/js/header.js?ref=20260928035821

js sciencepark.or.th collected 2026-09-27 20:58:51 UTC 3,308 bytes, 89 lines download raw bytes

1window.onscroll = function () {
2    scrollFunction()
3};
4
5function scrollFunction() {
6    if ($("#myBtnTop").hasClass("useBtn")) {
7        if (document.body.scrollTop > 500 || document.documentElement.scrollTop > 500) {
8            document.getElementById("myBtnTop").style.display = "block";
9        } else {
10            document.getElementById("myBtnTop").style.display = "none";
11        }
12    }
13}
14
15function topFunction() {
16    document.body.scrollTop = 0; document.documentElement.scrollTop = 0;
17}
18
19function checkint(el) {
20    var ex = /^[0-9]*$/;
21    if (ex.test(el.value) == false) {
22        el.value = el.value.substring(0, el.value.length - 1)
23    }
24}
25
26function setSizeLeftMenu() {
27    var e = $(window).height(), t = $("#menu-button").height(), s = e - t, a = $(".menu").height();
28    $("#menu-button").removeClass("menu-opened");
29    $(".menu").removeClass("open");
30    $(".menu").removeAttr("style");
31    $(".submenu-button").removeClass("list_close").addClass("list_open");
32    $(".sub_nav").removeClass("open");
33    if ($(window).width() > 768) {
34        $(".sub_nav").removeAttr("style");
35    }
36}
37
38$(document).ready(function () {
39    $(".ctl-contents img").addClass("img-responsive");
40    $(".ctl-contents video").addClass("img-responsive");
41
42    if (LANG == "ch") {
43        $(".ctl-contents").addClass("font-Simsun");
44    }
45
46    $("#menu_respon").menumaker({
47        title: '<div class="menu_reslogo"><a href="' + BaseUrl + LANG + '"><img src="' + BaseUrl + 'images/icons/logo_sciencepark.png" alt="Science park logo" class="nav_logo" /></a></div><div id="menu" style="padding-right: 10px;cursor: pointer;"><img src="' + BaseUrl + 'images/icons/burger_bar.png"/></div>',
48        breakpoint: 768,
49        format: "multitoggle",
50    });
51
52    $("#hsearch").autocomplete({
53        source: function (request, response) {
54            $.getJSON(BaseUrl + "index.php/sansarn_search/search_suggest/?q=" + request.term, function (data) {
55                response(data);
56            });
57        },
58        minLength: 1, delay: 300, autoFocus: true,
59        select: function (event, ui) { },
60        position: { my: "left top", at: "left bottom" }
61    });
62    $("#hd_search_form").submit(function () {
63        var val_search = $("#hsearch");
64        if (!val_search.val().trim()) {
65            alert("Please, fill search.");
66            val_search.focus();
67            return false;
68        }
69        $(this).attr('action', BaseUrl + LANG + '/search/' + encodeURIComponent(val_search.val().trim()));
70    });
71    $("#ssearch").autocomplete({
72        source: function (request, response) {
73            $.getJSON(BaseUrl + "index.php/sansarn_search/search_suggest/?q=" + request.term, function (data) {
74                response(data);
75            });
76        }, minLength: 1, delay: 300, autoFocus: true, select: function (event, ui) { }, position: { my: "left top", at: "left bottom" }
77    });
78    $("#ss_search_form").submit(function () {
79        var val_search = $("#ssearch");
80        if (!val_search.val().trim()) {
81            alert("Please, fill search.");
82            val_search.focus();
83            return false;
84        }
85        $(this).attr('action', BaseUrl + 'index.php/' + LANG + '/search/' + val_search.val().trim() + '/');
86    });
87
88    $(window).resize(function () { setSizeLeftMenu() });
89});

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.