PageSourceSearch

https://moldovenii.md/assets/js/some.js?v=1790937947

js moldovenii.md collected 2026-10-02 10:46:04 UTC 4,447 bytes, 147 lines download raw bytes

1$(document).ready(function () {
2    if(window.innerWidth > 1200)setTimeout($('.sticky-block').css('top', function () { return -($(this).height() - window.innerHeight); }),2000);
3    $("li.auto-down > a").on('click', function (e) {
4        e.preventDefault();
5    });
6
7    $('#slider').slick({
8        dots: true,
9        infinite: true,
10        speed: 500,
11        fade: true,
12        cssEase: 'linear',
13        autoplay: true,
14        arrows: false
15    });
16
17    $('.tts').tooltipster({
18        offsetX:5,
19        offsetY:5,
20        position:'bottom-left',
21        theme: '.tooltipster-shadow',
22        minWidth:100,
23        maxWidth:230
24    });
25
26    $("span.bullet").on('click', function (e) {
27        e.preventDefault();
28        $(this).closest('li').toggleClass('open');
29    })
30
31    $('.navbar-toggler').on('click',function (e) {
32        e.preventDefault();
33        $(this).parent().toggleClass('open');
34        $('body').toggleClass('noscroll');
35
36    })
37
38    $("ul.appeals_list li span, div.people_holder ul.groups li span").on('click', function() {
39        var Obj = $(this).parent().children('div.cnt_holder');
40
41        if (Obj.is(":hidden")) {
42            if($(this).hasClass('active_color') == false ) {
43                $(this).addClass('active_color');
44            }
45            Obj.slideDown('slow');
46        } else {
47            if($(this).hasClass('active_color') == true ) {
48                $(this).removeClass('active_color');
49            }
50            Obj.slideUp('slow');
51        }
52
53    });
54
55    $('.swtrlng-hold').on('click','.tr-swit', function() {
56        var trfr = $('#tr-fr').html();
57        var trto = $('#tr-to').html();
58        if ($('#tr-from').val() == 'ru') {
59            $('#tr-from').val('ro');
60            $('#tr-fr').html(trto);
61            $('#tr-to').html(trfr);
62        } else {
63            $('#tr-from').val('ru');
64            $('#tr-fr').html(trto);
65            $('#tr-to').html(trfr);
66        }
67    });
68
69    var currentSelPos = -1;
70    var totalSel = -1;
71
72    $('.tags-wrap').on('click','.tag-el',function (e) {
73
74    });
75
76    $('.tags-wrap').on('mouseover','.tag-el',function (e) {
77        $('.tag-el').removeClass('active');
78        $(this).addClass('active');
79        currentSelPos = $(this).data('count');
80        let tid = $(this).data('id');
81    });
82
83
84    $('.citysearch').on('keyup',function (e) {
85        console.log(1,totalSel,currentSelPos);
86        let code = e.keyCode;
87        if(!(code == 40 ||code == 38 ||code == 13))return;
88        let el = $('.tags-wrap').find('.active');
89        let id = currentSelPos;
90        if(el[0]) id = el.data('count');
91        if(code == 40 && id < totalSel){ //down
92            currentSelPos = id + 1;
93        }
94        if(code == 38 && id > 0){ //up
95            currentSelPos = id - 1;
96        }
97        if(code != 13) {
98            let newEl = $('[data-count="' + currentSelPos + '"]');
99            $('.tag-el').removeClass('active');
100            newEl.addClass('active');
101        }
102        console.log(2,totalSel,currentSelPos);
103        if(code == 13){
104            console.log($('.tag-el.active'));
105            if($('.tag-el.active').length > 0){$('.tag-el.active')[0].click();}
106            else return;
107        }
108    });
109
110    $('.citysearch').on('change, input',function (e) {
111        let cnt = 0;
112        let cityurl = `/${lang}/city/details/id/`;
113        if(this.value.length < 3) return;
114        fetch('/' + lang + '/city/autocomplete/?term='+this.value, {
115            method: 'GET'
116        })
117            .then(function (response) {
118                return response.text();
119            })
120            .then(function (html) {
121                if(JSON.stringify(html) != '[null]') {
122                    $('.tags-wrap').html('');
123                    currentSelPos = -1;
124                    let ret = JSON.parse(html);
125                    Object.entries(ret).forEach(([key, value]) => {
126                        $('.tags-wrap').show().append(`<a href="${cityurl + value.more}" class="tag-el" data-count="${cnt}" data-id="${value.more}" data-name="${value.label}" >` + value.label + '</a>');
127                    cnt++;
128                });
129                    totalSel = cnt - 1;
130                }
131            });
132    });
133
134    $('.toggle_button').on('click',function (e) {
135        e.preventDefault();
136        $('.toggle_content').toggle(200);
137    });
138
139    Fancybox.bind("[data-fancy]", {});
140    Fancybox.bind(".main-image", {});
141    console.log(Fancybox);
142
143
144
145});
146
147

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.