PageSourceSearch

https://charactercounts.org/wp-content/themes/lms-education/js/script.js?ver=1.0

js charactercounts.org collected 2026-09-24 09:01:36 UTC 6,021 bytes, 219 lines download raw bytes

1/* ===============================================
2	Open header search
3=============================================== */
4
5jQuery(document).ready(function(){
6	jQuery('.close-search-form').hide();
7});
8
9function lms_education_open_search_form() {
10	jQuery('.header-search .search-form').addClass('is-open');
11	jQuery('body').addClass('no-scrolling');
12	setTimeout(function(){
13    jQuery('.search-form  #header-searchform input#header-s').filter(':visible').focus();
14    jQuery('.close-search-form').show();
15    jQuery('.search-form #searchform #search').focus();
16	}, 100);
17
18	return false;
19}
20
21jQuery( ".header-search a.open-search-form").on("click", lms_education_open_search_form);
22
23/* ===============================================
24	Close header search
25=============================================== */
26
27function lms_education_close_search_form() {
28	jQuery('.header-search .search-form').removeClass('is-open');
29	jQuery('body').removeClass('no-scrolling');
30	jQuery('.close-search-form').hide();
31}
32
33jQuery( ".header-search a.close-search-form").on("click", lms_education_close_search_form);
34
35/* ===============================================
36	TRAP TAB FOCUS ON MODAL SEARCH
37============================================= */
38
39jQuery('.search-form #searchform #search').on('keydown', function (e) {
40  if (jQuery("this:focus") && (e.which === 9 && !e.shiftKey)) {
41    e.preventDefault();
42    jQuery(this).blur();
43    jQuery('.search-form #searchform :input.search-submit').focus();
44  }
45 else if (jQuery("this:focus") && (e.which === 9 && e.shiftKey)){
46    e.preventDefault();
47    jQuery(this).blur();
48    jQuery('.search-form a.close-search-form').focus();
49  }
50});
51
52jQuery('.search-form #searchform :input.search-submit').on('keydown', function (e) {
53  if (jQuery("this:focus") && (e.which === 9 && !e.shiftKey)) {
54    e.preventDefault();
55    jQuery(this).blur();
56    jQuery('.search-form a.close-search-form').focus();
57  }
58  else if (jQuery("this:focus") && (e.which === 9 && e.shiftKey)){
59    e.preventDefault();
60    jQuery(this).blur();
61    jQuery('.search-form #searchform #search').focus();
62  }
63});
64
65jQuery('.search-form a.close-search-form').on('keydown', function (e) {
66  if (jQuery("this:focus") && (e.which === 9 && !e.shiftKey)) {
67    e.preventDefault();
68    jQuery(this).blur();
69    jQuery('.search-form #searchform #search').focus();
70  }
71  else if (jQuery("this:focus") && (e.which === 9 && e.shiftKey)){
72    e.preventDefault();
73    jQuery(this).blur();
74    jQuery('.search-form #searchform :input.search-submit').focus();
75  }
76});
77
78/* ===============================================
79	OWL CAROUSEL SLIDER
80=============================================== */
81
82jQuery('document').ready(function(){
83  var owl = jQuery('.slider .owl-carousel');
84    owl.owlCarousel({
85    margin:20,
86    nav: false,
87    autoplay : true,
88    lazyLoad: true,
89    autoplayTimeout: 3000,
90    loop: false,
91    dots:true,
92    navText : ['<i class="fa fa-chevron-left py-4 p-3" aria-hidden="true"></i>','<i class="fa fa-chevron-right py-4 p-3" aria-hidden="true"></i>'],
93    responsive: {
94      0: {
95        items: 1
96      },
97      600: {
98        items: 1
99      },
100      1000: {
101        items: 1
102      }
103    },
104    autoplayHoverPause : true,
105    mouseDrag: true
106  });
107});
108
109jQuery('document').ready(function(){
110  var owl = jQuery('#courses .owl-carousel');
111    owl.owlCarousel({
112    margin:20,
113    nav: true,
114    autoplay : true,
115    lazyLoad: true,
116    autoplayTimeout: 3000,
117    loop: false,
118    dots:true,
119		rtl:true,
120    navText : ['<i class="fa fa-chevron-left py-4 p-3" aria-hidden="true"></i>','<i class="fa fa-chevron-right py-4 p-3" aria-hidden="true"></i>'],
121    responsive: {
122      0: {
123        items: 1
124      },
125      600: {
126        items: 2
127      },
128      1000: {
129        items: 4
130      }
131    },
132    autoplayHoverPause : true,
133    mouseDrag: true
134  });
135});
136
137
138/* ===============================================
139  OPEN CLOSE Menu
140============================================= */
141
142function lms_education_open_menu() {
143  jQuery('button.menu-toggle').addClass('close-panal');
144  setTimeout(function(){
145    jQuery('nav#main-menu').show();
146  }, 100);
147
148  return false;
149}
150
151jQuery( "button.menu-toggle").on("click", lms_education_open_menu);
152
153function lms_education_close_menu() {
154  jQuery('button.close-menu').removeClass('close-panal');
155  jQuery('nav#main-menu').hide();
156}
157
158jQuery( "button.close-menu").on("click", lms_education_close_menu);
159
160
161/* ===============================================
162  TRAP TAB FOCUS ON MODAL MENU
163============================================= */
164
165jQuery('button.close-menu').on('keydown', function (e) {
166  if (jQuery("this:focus") && (e.which === 9)) {
167    e.preventDefault();
168    jQuery(this).blur();
169    jQuery('button.menu-toggle').focus();
170  }
171});
172
173/* ===============================================
174  SCROLL TOP
175============================================= */
176
177jQuery(window).scroll(function () {
178    if (jQuery(this).scrollTop() > 100) {
179        jQuery('.scroll-up').fadeIn();
180    } else {
181        jQuery('.scroll-up').fadeOut();
182    }
183});
184
185jQuery('a[href="#tobottom"]').click(function () {
186    jQuery('html, body').animate({scrollTop: 0}, 'slow');
187    return false;
188});
189
190/* ===============================================
191  STICKY-HEADER
192============================================= */
193
194jQuery(window).scroll(function () {
195		var sticky = jQuery('.sticky-header'),
196		scroll = jQuery(window).scrollTop();
197
198		if (scroll >= 100) sticky.addClass('fixed-header');
199		else sticky.removeClass('fixed-header');
200	});
201
202/* ===============================================
203  COURSES SIDEBAR
204============================================= */
205
206var $el = jQuery('.course-sidebar-secondary');
207var classes = $el.attr('class');
208classes = 'sidebar-area' +' ' +classes;
209$el.attr('class', classes);
210
211/*===============================================
212 PRELOADER
213=============================================== */
214
215jQuery('document').ready(function($){
216  setTimeout(function () {
217  jQuery(".cssloader").fadeOut("slow");
218},1000);
219});

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.