PageSourceSearch

https://www.bblam.co.th/application/themes/kos/js/homepage.js

js bblam.co.th collected 2026-10-07 20:05:16 UTC 5,151 bytes, 138 lines download raw bytes

1$(document).ready(function() {
2    var _this = {
3        init: function() {
4            this.get_top_slider();
5            this.box_action();
6            this.reward_slider();
7            this.xs_move_mininav();
8            this.resize();
9        },
10        get_top_slider: function() {
11            if (!edit) {
12                var section = $('.section-top-page');
13                var slider = section.find('.section-slider');
14                slider.find('.block-contents').css('min-height', ($window.height() - header.outerHeight()));
15                slider.bxSlider({
16                    mode: 'fade',
17                    auto: true,
18                    speed: 1200,
19                    pause: 4000,
20                    controls: false,
21                    adaptiveHeight: true,
22                    onSliderLoad: function() {
23                        script.visibility(slider);
24                        var sectiontext = section.find('.section-text');
25                        var bxcontrols = section.find('.bx-controls');
26                        bxcontrols.insertAfter(sectiontext);
27
28                    },
29                });
30            }
31        },
32        box_action: function() {
33            var box = $('.col-main .box');
34            var $box = {
35                init: function() {
36                    this.content_slider();
37                    this.item_background();
38                },
39                content_slider: function() {
40                    var _action = {
41                        init: function() {
42                            var contents = box.find('.contents');
43                            var gallery = box.find('.gallery-list');
44                            this.action(contents);
45                            this.action(gallery);
46                        },
47
48                        action: function(slider) {
49                            if (!edit) {
50                                slider.each(function() {
51                                    var _slider = $(this);
52                                    var item = _slider.find('.item');
53                                    if (item.length > 1) {
54                                        _slider.bxSlider({
55                                            mode: 'fade',
56                                            speed: 800,
57                                            pause: 8000,
58                                            adaptiveHeight: true,
59                                            onSliderLoad: function() {
60                                                script.visibility(_slider);
61                                            },
62                                        });
63                                    } else {
64                                        script.visibility(_slider);
65                                    }
66                                })
67                            }
68
69                        }
70                    }
71                    _action.init();
72
73
74                },
75                item_background: function() {
76                    var boximage = box.find('.image');
77                    boximage.each(function() {
78                        var item = $(this).find('.item');
79                        var img = item.find('img');
80                        if ((item.length == 1) && img.length == 1) {
81                            script.get_background($(this));
82                            script.visibility_hidden(item);
83                        }
84                    })
85                },
86            }
87            $box.init();
88        },
89        reward_slider: function() {
90            var slider = $('.reward-slider');
91            var item = slider.find('.block-item');
92            if (item.length > 1) {
93                if (!edit) {
94                    slider.bxSlider({
95                        mode: 'fade',
96                        speed: 800,
97                        pause: 8000,
98                        adaptiveHeight: true,
99                        pager:false,
100                        onSliderLoad: function() {
101                            script.visibility(slider);
102                        },
103                    });
104                }
105            }
106        },
107        xs_move_mininav:function(){
108            var mininav = $('.nav-table-data');
109            var firstbox = $('.col-main > .box').eq(0);
110            var social = $('.side-bar .box-social-links');
111            if($(window).width() < 991){
112                if(!$('.col-main .nav-table-data').length){
113                    mininav.insertBefore(firstbox);
114                }
115               
116            }else{
117                if($('.col-main .nav-table-data').length){
118                    mininav.insertBefore(social);
119                }
120            }
121
122        },
123        load: function() {
124            $window.load(function() {
125
126            })
127        },
128        resize: function() {
129            var self = this;
130            $window.resize(function() {
131                self.xs_move_mininav();
132            })
133        },
134    }
135
136    _this.init();
137
138});

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.