PageSourceSearch

https://pooyabook.com/assets/site/js/home.js

js pooyabook.com collected 2026-10-03 18:33:38 UTC 5,688 bytes, 214 lines download raw bytes

1$(document).ready(function () {
2
3    $('.email-input').on('focus', function () {
4        var This = $(this);
5
6        if (This.val() === '') {
7            This.siblings('.fake-placeholder').css({
8                'top': '-2rem',
9                'font-size': '12px',
10                'color': '#fff',
11//                    'color': '#EF4763',
12            })
13        }
14    });
15    $('.email-input').on('blur', function () {
16        var This = $(this);
17
18        if (This.val() !== '') {
19            This.siblings('.fake-placeholder').css({
20                'top': '-2rem',
21                'font-size': '12px',
22                'color': '#fff',
23            })
24        }
25        else {
26            This.siblings('.fake-placeholder').css({
27                'top': '0.8rem',
28                'font-size': 'inherit',
29                'color': '#9e9e9e',
30
31            })
32        }
33    });
34    $('.featuredVideos').slick({
35        lazyLoad: 'ondemand',
36        slidesToShow: 4,
37        dots: true,
38        slidesToScroll: 1,
39//            focusOnSelect:true,
40//            autoplay: true,
41        autoplaySpeed: 3000,
42        responsive: [
43            {
44                breakpoint: 2500,
45                settings: {
46                    slidesToShow: 7,
47                }
48            },
49            {
50                breakpoint: 2100,
51                settings: {
52                    slidesToShow: 6,
53                }
54            },
55            {
56                breakpoint: 1700,
57                settings: {
58                    slidesToShow: 5,
59                }
60            },
61            {
62                breakpoint: 1200,
63                settings: {
64                    slidesToShow: 5,
65                }
66            },
67            {
68                breakpoint: 992,
69                settings: {
70                    slidesToShow: 4,
71                }
72            },
73            {
74                breakpoint: 768,
75                settings: {
76                    slidesToShow: 3,
77                }
78            },
79            {
80                breakpoint: 576,
81                settings: {
82                    slidesToShow: 2,
83                }
84            },
85            {
86                breakpoint: 426,
87                settings: {
88                    slidesToShow: 1,
89                }
90            }
91            // You can unslick at a given breakpoint now by adding:
92            // settings: "unslick"
93            // instead of a settings object
94        ]
95    });
96    $('.mostRatedVideos').slick({
97        slidesToShow: 5,
98        lazyLoad: 'ondemand',
99        slidesToScroll: 1,
100//            autoplay: false,
101//            autoplaySpeed: 9000,
102        responsive: [
103
104            {
105                breakpoint: 1200,
106                settings: {
107                    slidesToShow: 4,
108                    slidesToScroll: 1
109                }
110            },
111            {
112                breakpoint: 992,
113                settings: {
114                    slidesToShow: 4,
115                    slidesToScroll: 1
116                }
117            },
118            {
119                breakpoint: 768,
120                settings: {
121                    slidesToShow: 3,
122                    slidesToScroll: 1
123                }
124            },
125            {
126                breakpoint: 576,
127                settings: {
128                    slidesToShow: 2,
129                    slidesToScroll: 1
130                }
131            },
132            {
133                breakpoint: 426,
134                settings: {
135                    slidesToShow: 1,
136                    slidesToScroll: 1
137                }
138            }
139        ]
140    });
141    $('.featuredVideos').on('click', '.getRelatedVideos', function (event) {
142//            event.preventDefault();
143        var hRef = $(event.target).attr('href');
144        console.log(hRef);
145
146        var video_id = $(event.target).attr('data-video-id');
147        console.log(video_id);
148
149        var content = $('' + hRef + ' .row').html().trim();
150        console.log(content);
151
152        if (content === '') {
153            $.ajax({
154                type: 'get',
155                url: '/get-related-videos/' + video_id,
156                success: function (data) {
157                    console.log(data);
158                    $('' + hRef + ' .row').html('').html(data);
159                }
160            });
161        }
162    });
163
164});
165
166function showExtraInfoBox(el) {
167    var This = $(el);
168    $('.featuredVideos').slick('slickPause');
169
170    This.siblings('.extraInfo').css({
171        'height': 'calc(100% - 100px)'
172    });
173
174
175    This.find('.infoIconContainer').css({
176//            'z-index': '-100'
177        'background': 'rgba(0, 0, 0, 0.2)'
178    });
179
180    This.closest('.specialBooks').find('.specialBooks__closeBtn').css({
181        'z-index': '1000'
182    });
183}
184
185function hideExtraInfoBox(el) {
186    $('.featuredVideos').slick('slickPlay');
187
188    var This = $(el);
189    This.closest('.specialBooks').find('.extraInfo').css({
190        'height': '0'
191    });
192    This.closest('.specialBooks').find('.specialBooks__closeBtn').css({
193        'z-index': '-100'
194    });
195}
196
197function registerNewsLetterEmail() {
198    var form = document.getElementById('newsLetterForm');
199    var form_data = new FormData(form);
200
201    $.ajax({
202        type: 'post',
203        processData: false,
204        contentType: false,
205        data: form_data,
206        url: '/news-letter',
207        success: function (data) {
208            alert(data.message);
209        },
210        fail: function (error) {
211            alert(error.message);
212        }
213    });
214}

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.