PageSourceSearch

https://www.ticketmarket.lt/assets/js/category.js

js ticketmarket.lt collected 2026-10-02 06:58:41 UTC 1,906 bytes, 65 lines download raw bytes

1var addNth = (function () {
2    var len, i = 0, className, prevIndexes = [];
3    
4    function isNew (el) {
5         return ( el.hasClass(className) );
6    }
7    
8    return function (selector, html, nth, className ) {
9        var els = $( selector );
10        className = className || 'test';
11        
12        if ( $.inArray(nth, prevIndexes) === -1 ) {
13            prevIndexes.push(nth);
14            
15            $.each(els, function( index, el ) {
16                el = $(el);
17                if ( (i % nth) === 0 && i !== 0 ) {
18                    if ( ! isNew(el) ) {
19                        el.before( html );
20                    }
21                }
22                i++;
23            });
24            i = 0;
25        }
26    }
27})();
28if (typeof category_banners_con === 'undefined') {
29
30}else{
31	var ctbcon = category_banners_con;
32	addNth('.event-item', ctbcon, 12);
33	 
34	var iheight_single = $('.category_banner_single > .bannerBox_single:nth-child(2)').height();
35	setInterval(function() {
36		$('.category_banner_single').each(function(){
37			var banner = this;
38			
39			//$(banner).find('.bannerBox_single:first').animate({"margin-top": '-='+iheight_single});
40			setTimeout(function() {
41				//$(banner).find('.bannerBox_single:first').css("margin-top", '0');
42				$(banner).find('.bannerBox_single:first').appendTo(banner);
43			}, 2500);
44		});   
45		
46		
47	  
48	}, 3000);
49}
50
51$('.event-item').addClass('active');
52$('.city-filter select').on('change', function() {
53	if(this.value == 'all'){
54		$('.events-grid .event-item').show().addClass('active');
55	}else{
56		$('.events-grid .event-item').hide().removeClass('active');
57		//$('[data-city="test"]).show();
58		 $('.events-grid .event-item[data-city*="' + this.value + '"]').show();
59		 $('.events-grid .event-item[data-city*="' + this.value + '"]').addClass('active');
60	}
61	
62	$('.category_banner_single').remove();
63	addNth('.events-grid .event-item.active', ctbcon, 12);
64	
65});

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.