PageSourceSearch

https://mpenta.org/wp-content/themes/kinder/admin/tools/custom_menu/custom_menu.js

js mpenta.org collected 2026-10-08 23:23:22 UTC 2,309 bytes, 72 lines download raw bytes

1jQuery(document).ready(function(){
2"use strict";
3	var THEMEREX_custom_menu_placeholder = '';
4	var THEMEREX_custom_menu_holderItem = '';
5	jQuery('.menu-panel ul.sub-menu li a').hover(
6		function(){
7			if (!jQuery(this).parents('.menu-panel').hasClass('columns')) {
8				var title = jQuery(this).data('title'),
9					href = jQuery(this).data('link'),
10					thumb = jQuery(this).data('thumb'),
11					author = jQuery(this).data('author'),
12					pubdate = jQuery(this).data('pubdate'),
13					comments = jQuery(this).data('comments'),
14					holderParent = jQuery(this).parents('ul').next();
15				if (holderParent) {
16					THEMEREX_custom_menu_placeholder = holderParent.html();
17					THEMEREX_custom_menu_holderItem  = holderParent;
18					holderParent.find('img').attr('src', thumb);
19					holderParent.find('.item_title a').text(title).attr('href', href);
20					holderParent.find('.item_pubdate em').text(pubdate);
21					holderParent.find('.item_comments em').text(comments);
22					holderParent.find('.item_author em').text(author);
23				}
24			}
25		},
26		function() {
27			/*
28			if (THEMEREX_custom_menu_holderItem) {
29				THEMEREX_custom_menu_holderItem.html(THEMEREX_custom_menu_placeholder);
30			}
31			*/
32		}
33	);
34
35	var THEMEREX_custom_menu_hover_timeout = 0;
36	jQuery('#mainmenu li.custom_view_item').hover(
37		function(e) {
38			if (jQuery('body').hasClass('responsive_menu')) return;
39			var th = jQuery(this);
40			var panel = th.find('.menu-panel');
41			panel.css({'display': 'block', 'visibility': 'hidden', 'left': 0});
42			if (panel.hasClass('thumb_title')) {
43				var li = panel.find('li > ul > li');
44				var w = li.width() + parseInt(li.css('marginRight'));
45				if (li.length > 1 && jQuery(window).width() > w*2) {
46					w = w*2;
47					panel.width(w);
48				}
49			} else {
50				var w = panel.outerWidth();
51			}
52			panel.css({'display': 'none', 'visibility': 'visible'});
53			var off = th.offset().left-th.parent().offset().left;
54			if (off + w > th.parent().width()) off = th.parent().width() - w - 1;
55			panel.css('left', off);
56		},
57		function(e){
58		}
59	);
60});
61
62function parentCheck(th, divName, thType) {
63	"use strict";
64	thType = th.get(0).tagName.toLowerCase();
65	if (divName != '' && thType == 'li') {
66		if (th.find(divName).length > 0) {
67			return th.find(divName);
68		} else {
69			return parentCheck(th.parent().parent(), divName);
70		}
71	}
72}

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.