PageSourceSearch

https://skpanick.github.io/js/education.js

js skpanick.github.io collected 2026-10-03 09:57:56 UTC 1,289 bytes, 111 lines download raw bytes

1/* JS Document */
2
3/******************************
4
5[Table of Contents]
6
71. Vars and Inits
82. Set Header
93. Init Menu
10
11
12******************************/
13
14$(document).ready(function()
15{
16	"use strict";
17
18	/* 
19
20	1. Vars and Inits
21
22	*/
23
24	var header = $('.header');
25	var menu = $('.menu');
26	var burger = $('.hamburger');
27	var menuActive = false;
28
29	setHeader();
30
31	$(window).on('resize', function()
32	{
33		setHeader();
34
35		if(window.innerWidth > 1280)
36		{
37			if(menuActive)
38			{
39				closeMenu();
40			}
41		}
42		setTimeout(function()
43		{
44			jQuery(".main_content_scroll").mCustomScrollbar("update");
45		}, 375);
46	});
47
48	$(document).on('scroll', function()
49	{
50		setHeader();
51	});
52
53	initMenu();
54
55	/* 
56
57	2. Set Header
58
59	*/
60
61	function setHeader()
62	{
63		if($(window).scrollTop() > 91)
64		{
65			header.addClass('scrolled');
66		}
67		else
68		{
69			header.removeClass('scrolled');
70		}
71	}
72
73	/* 
74
75	3. Init Menu
76
77	*/
78
79	function initMenu()
80	{
81		if($('.hamburger').length && $('.menu').length)
82		{
83			var hamb = $('.hamburger');
84
85			hamb.on('click', function()
86			{
87				if(!menuActive)
88				{
89					openMenu();
90				}
91				else
92				{
93					closeMenu();
94				}
95			});
96		}
97	}
98
99	function openMenu()
100	{
101		menu.addClass('active');
102		menuActive = true;
103	}
104
105	function closeMenu()
106	{
107		menu.removeClass('active');
108		menuActive = false;
109	}
110
111});

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.