PageSourceSearch

https://korshop.ru/bitrix/templates/profood_new/components/bitrix/menu/catalog_newest/script.js?17585324463584

js korshop.ru collected 2026-10-02 05:01:04 UTC 3,584 bytes, 137 lines download raw bytes

1var RSGoPro_MenuTO = 0;
2var RSGoPro_MenuElemHover = false;
3
4function loadProductToday($handlerPath) {
5	$('.product-today').each(function () {
6		if(productId = parseInt($(this).data('id')))
7		{
8			var _this = $(this);
9
10			$.get($handlerPath, {ELEMENT_ID:productId}, function (data) {
11                _this.html(data);
12            });
13		}
14    });
15}
16
17function RSGoPro_ElementInMenuPos( $liObj )
18{
19	var l = 250;
20	var $searchObj;
21	if( !$liObj.hasClass('first') )
22	{
23		$searchObj = $liObj.parents('li.first');
24	} else {
25		$searchObj = $liObj;
26	}
27	if( $searchObj.find('.elementinmenu').length>0 )
28	{
29		var c = $('.catalogmenu').find('li.hover').length - 2;
30		if( $('.catalogmenu').find('li.hover:last').parent().find('ul').length<1 )
31		{
32			c = c - 1;
33		}
34		if( $('.centering:first').width() < 1260 )
35		{
36			c = c + 5;
37		}
38		if(c>2)
39		{
40			$('.catalogmenu').find('li.first.hover').parent().find('.elementinmenu').css({'display':'none'});
41		} else {
42			$('.catalogmenu').find('li.first.hover').parent().find('.elementinmenu').css({'display':'block','left':(c*l-2)+'px'});
43		}
44	}
45}
46
47$(document).ready(function(){
48	
49	$('.catalogmenu').on('mouseenter',function(){
50		$(this).addClass('hover');
51	}).on('mouseleave',function(){
52		$(this).removeClass('hover');
53	});
54	
55	var timeoutHover = {};
56	$('.catalogmenu a').on('click',function(e){
57		var $link = $(this);
58		if(!$link.hasClass('hover')){
59			e.preventDefault();
60			$link.addClass('hover');
61		}
62	}).on('mouseenter',function(){
63		var $link = $(this);
64		$link.parent().parent().find('a.hover').removeClass('hover');
65		timeoutHover[$link.index()] = setTimeout(function(){
66			$link.addClass('hover');
67		},150);
68	}).on('mouseleave',function(){
69		var $link = $(this);
70		clearTimeout(timeoutHover[$link.index()]);
71		timeoutHover[$link.index()] = setTimeout(function(){
72			$link.removeClass('hover');
73		},2);
74	});
75	
76	$('.catalogmenu li').on('mouseenter',function(){
77		var $liObj = $(this);
78		$liObj.parent().find('li.hover').removeClass('hover');
79		setTimeout(function(){
80			$liObj.addClass('hover');
81			//RSGoPro_ElementInMenuPos( $liObj );
82		},2);
83	}).on('mouseleave',function(){
84		var $liObj = $(this);
85		setTimeout(function(){
86			if(!RSGoPro_MenuElemHover)
87			{
88				$liObj.removeClass('hover')
89			}
90		//	RSGoPro_ElementInMenuPos( $liObj );
91		},2);
92	});
93	
94	$('.catalogmenu .elementinmenu').on('mouseenter',function(){
95		RSGoPro_MenuElemHover = true;
96	}).on('mouseleave',function(){
97		RSGoPro_MenuElemHover = false;
98	});
99	
100	if(RSDevFunc_PHONETABLET)
101	{
102		$('.catalogmenusmall a.parent').on('click',function(){
103			$('.mobile-menu').toggleClass('noned');
104		});
105	} else {
106		$('.catalogmenusmall li.parent').on('mouseenter',function(){
107			$(this).find('.mobile-menu').removeClass('noned');
108		}).on('mouseleave',function(){
109			$(this).find('.mobile-menu').addClass('noned');
110		});
111	}
112});/*
113$().ready(function () {
114    var heightMenu = $('ul.lvl1').outerHeight();
115
116    $('li.first').hover(function () {
117        var heightMenuItem = 0;
118        var prevHeight = 10;
119        leftPerc = 25;
120        $(this).find('ul.lvl2 > li').each(function () {
121            if(heightMenuItem + $(this).outerHeight() > heightMenu)
122            {
123            	if(prevHeight + $(this).outerHeight() > heightMenu)
124				{
125                    prevHeight = 10;
126                    leftPerc = 25;
127				}
128                $(this).css('position','absolute').css('left', leftPerc+'%').css('top', prevHeight+'px');
129                prevHeight+=$(this).outerHeight();
130            }
131            else{
132                heightMenuItem+= $(this).outerHeight();
133            }
134        });
135    });
136
137});*/

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.