PageSourceSearch

https://manarat.ac.bd/wp-content/themes/manarat/assets/js/main.js

js manarat.ac.bd collected 2026-10-02 08:46:40 UTC 4,529 bytes, 192 lines download raw bytes

1(function($) {
2	/*---------------------
3 TOP Menu Stick
4--------------------- */
5	var s = $(".main-menu");
6	var pos = s.position();					   
7	$(window).scroll(function() {
8		var windowpos = $(window).scrollTop();
9		if (windowpos > pos.top) {
10		s.addClass("stick");
11		} else {
12			s.removeClass("stick");	
13		}
14	});
15	 s1 = $(".c-header");
16	var pos1 = s1.position();					   
17	$(window).scroll(function() {
18		var windowpos1 = $(window).scrollTop();
19		if (windowpos1 > pos1.top) {
20		s1.addClass("stick");
21		} else {
22			s1.removeClass("stick");	
23		}
24	});
25
26	$(document).ready(function(){
27	function dropdown(){
28	if ($(".department-menu ul.menu")[0]){
29		
30	   var parant_width = $(".department-menu ul.menu").width();
31	   var child_width = 0;
32	   var h = 1;
33	   var i = 1;
34	   var j = 1;
35	   var k = 1;
36	   $('.department-menu ul.menu>li').each(function() {
37	   	var parant_width = $(".department-menu ul.menu").width();
38	    child_width += $(this).outerWidth( true );
39		});
40	   if (parant_width <= child_width) {
41
42	   		$(".department-menu").addClass('dropdown-active');
43	   }else{
44	   	$(".department-menu").removeClass('dropdown-active');
45	   }
46	}
47	}
48	dropdown();
49	$( window ).resize(function() {
50	dropdown();
51
52	});
53});
54
55	$(document).ready(function(){
56                $(".hotspot_sea-wave:nth-child(2)").html("<p>Gulshan Campus</p>");
57				 $(".hotspot_sea-wave:last-child").html("<p>Ashulia Campus</p>");
58            });
59	$(document).ready(function(){
60		var methods = {
61		activateCloseMenuBtn : function(e) {
62				
63				var xOffset = -17,
64				yOffset = 25,
65				contentWidth = $('body').width(),
66				mouseX = 0, 
67				mouseY = 0;
68				
69				// cache the selector
70				var follower = $("#pm-mobile-menu-hover-close-btn");
71				var xp = 0, 
72				yp = 0,
73				speed = 0;
74				
75				$("#pm-mobile-menu-overlay").css("cursor", "none");
76				
77				$('#pm-mobile-menu-hover-close-btn').animate({
78					'opacity' : 1	
79				});
80				var menuHover = '';
81				$("#pm-mobile-menu-overlay").on('mousemove mouseleave', function(e) {
82					
83					if( e.type === 'mousemove' ){
84						
85						if( menuHover === true ) {
86							
87							menuHover = false;
88							follower.css({
89								"opacity" : 1	
90							});
91							
92						}
93						
94						mouseX = e.pageX;
95   						mouseY = e.pageY;
96						
97						follower.css({"left" : mouseX + xOffset, "top" : mouseY + yOffset}); 	
98						
99					} else if( e.type === 'mouseleave' ){
100						
101						menuHover = true;
102						follower.css({
103							"opacity" : 0	
104						});
105						
106						follower.css({"left" : 0, "top" : 0});
107						
108					} else {
109						//	
110					}
111									
112				});
113				
114				menuLoop = setInterval(function () {
115				
116					// change 12 to alter damping higher is slower
117					xp += ((mouseX - xp) / speed) + xOffset;
118					yp += ((mouseY - yp) / speed) + yOffset;
119					follower.css({left:xp, top:yp});
120					
121				}, 30);
122				
123			},
124			hideCloseMenuBtn : function(e) {
125				
126				$('#pm-mobile-menu-hover-close-btn').animate({
127					'opacity' : 0	
128				}, 'fast');
129				
130				clearInterval(menuLoop);				
131				
132			}
133			
134};
135    $('.pm-mobile-menu-trigger').click(function() {
136			
137			
138				
139				
140				$('body').addClass('menu-opened');
141				$('#pm-mobile-menu-overlay').addClass('active');
142				
143				//Show the neccessary menu
144				$('.pm-mobile-global-menu-container', '#pm-mobile-global-menu').addClass('active');
145				
146				//Hide other menus
147				$('.pm-mobile-global-sign-in-container', '#pm-mobile-global-menu').removeClass('active');
148				$('.pm-mobile-global-registration-container', '#pm-mobile-global-menu').removeClass('active');
149				
150				methods.activateCloseMenuBtn();
151				
152			});
153    $('#pm-mobile-menu-hover-close-btn').click(function() { 
154						
155				$('body').removeClass('menu-opened').addClass('menu-collapsed');
156				$('#pm-mobile-menu-overlay').removeClass('active');
157				
158				methods.hideCloseMenuBtn();
159				
160			
161			e.preventDefault();
162			
163		});
164    $('#pm-mobile-menu-overlay').click(function() { 
165						
166				$('body').removeClass('menu-opened').addClass('menu-collapsed');
167				$('#pm-mobile-menu-overlay').removeClass('active');
168				
169				methods.hideCloseMenuBtn();
170				
171			
172			e.preventDefault();
173			
174		});
175    /* ==========================================================================
176	   Main menu interaction
177	   ========================================================================== */
178		if( $('.pm-nav').length > 0 ){
179			$('.sf-sub-indicator').html('<i class="fas fa-angle-down"></i>');
180			
181			$('.sf-menu ul .sf-sub-indicator').html('<i class="fas fa-angle-right"></i>');
182						
183		};
184});
185		 
186			
187			
188		})(jQuery);
189
190
191
192		

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.