PageSourceSearch

https://iddinkdigital.com/Scripts/lib/scripts.js

js iddinkdigital.com collected 2026-10-05 02:34:06 UTC 4,481 bytes, 150 lines download raw bytes

1$(function($) {
2	setTimeout(function() {
3		$('#content-wrapper > .row').css({
4			opacity: 1
5		});
6	}, 200);
7	
8	$('#sidebar-nav,#nav-col-submenu').on('click', '.dropdown-toggle', function (e) {		
9		var $item = $(this).parent();
10        if (!$item.hasClass('open')) {
11            $item.parent().find('.open .submenu').slideUp('fast');
12            $item.parent().find('.open').toggleClass('open');
13        }
14		
15		$item.toggleClass('open');
16		
17		if ($item.hasClass('open')) {
18			$item.children('.submenu').slideDown('fast');
19		} 
20        else {
21			$item.children('.submenu').slideUp('fast');
22		}
23	});
24
25    $('#sidebar-nav .submenu li').on('click', function (e) {
26        var $item = $(this).parent();
27        if ($item.hasClass('submenu-branch')) {
28            return;
29        }
30
31        $('#sidebar-nav .submenu li').removeClass('active');
32        $(this).addClass('active');
33        $('#sidebar-nav li.open').removeClass('open');
34        $(this).parent().parent().addClass('open');
35    });
36	
37	$('body').on('mouseenter', '#page-wrapper.nav-small #sidebar-nav .dropdown-toggle', function (e) {
38		if ($( document ).width() >= 992) {
39			var $item = $(this).parent();
40
41			if ($('body').hasClass('fixed-leftmenu')) {
42				var topPosition = $item.position().top;
43
44				if ((topPosition + 4*$(this).outerHeight()) >= $(window).height()) {
45					topPosition -= 6*$(this).outerHeight();
46				}
47
48				$('#nav-col-submenu').html($item.children('.submenu').clone());
49				$('#nav-col-submenu > .submenu').css({'top' : topPosition});
50			}
51            
52			$item.children('.submenu').slideDown('fast');
53		}
54	});
55	
56	$('body').on('mouseleave', '#page-wrapper.nav-small #sidebar-nav > .nav-pills > li', function (e) {
57		if ($( document ).width() >= 992) {
58            $(this).children('.submenu').slideUp('fast');
59		}
60	});
61	$('body').on('mouseenter', '#page-wrapper.nav-small #sidebar-nav a:not(.dropdown-toggle)', function (e) {
62		if ($('body').hasClass('fixed-leftmenu')) {
63			$('#nav-col-submenu').html('');
64		}
65	});
66	$('body').on('mouseleave', '#page-wrapper.nav-small #nav-col', function (e) {
67		if ($('body').hasClass('fixed-leftmenu')) {
68			$('#nav-col-submenu').html('');
69		}
70	});
71	
72	$('#make-small-nav').click(function (e) {
73        $('#page-wrapper').toggleClass('nav-small');
74        $('#sidebar-nav .nav > li.open .submenu').show();
75        $('.nav-small #nav-col #sidebar-nav .nav li .submenu').hide();
76	});
77	
78	$(window).smartresize(function(){
79		if ($( document ).width() <= 991) {
80			$('#page-wrapper').removeClass('nav-small');
81		}
82	});
83	
84	$('.mobile-search').click(function(e) {
85		e.preventDefault();
86		
87		$('.mobile-search').addClass('active');
88		$('.mobile-search form input.form-control').focus();
89	});
90	$(document).mouseup(function (e) {
91		var container = $('.mobile-search');
92
93		if (!container.is(e.target) // if the target of the click isn't the container...
94			&& container.has(e.target).length === 0) // ... nor a descendant of the container
95		{
96			container.removeClass('active');
97		}
98	});
99	
100	//$('.fixed-leftmenu #col-left').nanoScroller({
101 //   	alwaysVisible: false,
102 //   	iOSNativeScrolling: false,
103 //   	preventPageScrolling: true,
104 //   	contentClass: 'col-left-nano-content'
105 //   });
106	
107	// build all tooltips from data-attributes
108	$("[data-bs-toggle='tooltip']").each(function (index, el) {
109		$(el).tooltip({
110			placement: $(this).data("placement") || 'top'
111		});
112	});
113});
114
115$.fn.removeClassPrefix = function(prefix) {
116    this.each(function(i, el) {
117        var classes = el.className.split(" ").filter(function(c) {
118            return c.lastIndexOf(prefix, 0) !== 0;
119        });
120        el.className = classes.join(" ");
121    });
122    return this;
123};
124
125(function($,sr){
126	// debouncing function from John Hann
127	// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
128	var debounce = function (func, threshold, execAsap) {
129		var timeout;
130
131		return function debounced () {
132			var obj = this, args = arguments;
133			function delayed () {
134				if (!execAsap)
135					func.apply(obj, args);
136				timeout = null;
137			};
138
139			if (timeout)
140				clearTimeout(timeout);
141			else if (execAsap)
142				func.apply(obj, args);
143
144			timeout = setTimeout(delayed, threshold || 100);
145		};
146	}
147	// smartresize 
148	jQuery.fn[sr] = function(fn){	return fn ? this.bind('resize', debounce(fn)) : this.trigger(sr); };
149
150})(jQuery,'smartresize');

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.