PageSourceSearch

https://www.pelastusopisto.fi/wp-content/themes/pelastusopisto/js/myScript.js?var=1790915972

js pelastusopisto.fi collected 2026-10-02 04:41:29 UTC 5,596 bytes, 160 lines download raw bytes

1jQuery(document).ready(function() {
2    var currentTab = window.location.hash.substring(1);
3    //console.log('currentTab='+currentTab);
4    if(currentTab) {
5        jQuery('ul.tabs_category_nav li').removeClass('active');
6        jQuery('ul.tabs_category_nav li a').each(function (index, a) {
7            if (jQuery(this).attr('data-id') == currentTab) {
8                //jQuery(jQuery('ul.tabs_category_nav li')[jQuery(this).index()]).trigger('click');
9                jQuery(this).parent('li').addClass('active');
10                jQuery(".pal_tabCat_listing_section div.tab_cat_list_panel").hide();
11                jQuery(".pal_tabCat_listing_section div.tab_cat_list_panel[data-id="+currentTab+"]").show();
12		jQuery(".pal_tabCat_listing_section div.tab_cat_list_panel[data-id="+currentTab+"]").addClass('active');
13                jQuery(".pela_tabCat_wrapper").css('opacity','1');
14                jQuery(".tabContentLoader").css('display','none');
15                
16            }
17          });
18        
19        
20        //$("ul.tabs li:has(a[href=" + tab + "])").click();
21        jQuery('ul.tabs_category_nav li').on('click',function() {
22            jQuery('.tab_cat_list_panel').hide();
23            jQuery('.tab_cat_list_panel').removeClass('active');
24            jQuery('ul.tabs_category_nav li').removeClass('active');
25            jQuery(jQuery('.tab_cat_list_panel')[jQuery(this).index()]).show();
26            jQuery(jQuery('.tab_cat_list_panel')[jQuery(this).index()]).addClass('active');
27            jQuery(jQuery('ul.tabs_category_nav li')[jQuery(this).index()]).addClass('active');
28        });   
29    } else {
30        jQuery('.tab_cat_list_panel').hide();
31
32        jQuery('ul.tabs_category_nav li').on('click',function() {
33            jQuery('.tab_cat_list_panel').hide();
34            jQuery('.tab_cat_list_panel').removeClass('active');
35            jQuery('ul.tabs_category_nav li').removeClass('active');
36            jQuery(jQuery('.tab_cat_list_panel')[jQuery(this).index()]).show();
37            jQuery(jQuery('.tab_cat_list_panel')[jQuery(this).index()]).addClass('active');
38            jQuery(jQuery('ul.tabs_category_nav li')[jQuery(this).index()]).addClass('active');
39        }).first().trigger('click');
40        jQuery(".pela_tabCat_wrapper").css('opacity','1');
41        jQuery(".tabContentLoader").css('display','none');
42    //});
43    
44    }
45
46    
47});
48
49
50jQuery(function($) {
51	$(".fp-boxes-nopadding a.gutentor-link").each(function() {
52		var $this = $(this);
53		var _href = $this.attr("href"); 
54		$($this).append(_href);
55	});
56	$(".front-blog-section a.gutentor-post-image-link").each(function() {
57		var $this = $(this);
58		var _href = $this.attr("href"); 
59		$($this).append(_href);
60	});
61});
62
63jQuery(function($) {
64    $(".icon-arrow-left").each(function() {
65        var $this = $(this);
66        var _href = '<span class="sr-only">Open</span>'
67        $($this).append(_href);
68    });
69	$(".level_list_box a").each(function() {
70        var $this = $(this);
71        var _href = '<span class="sr-only">Home</span>'
72        $($this).append(_href);
73    });
74});
75
76
77//siirretään + painike tabilla saavutettavaksi.
78jQuery(document).ready(function($){
79$('.mega-menu-item > a > span').each(function() {
80    $(this).parent().before(this);
81})
82});
83
84
85jQuery(document).ready(function($){
86		$('.mega-indicator').attr('tabindex', '0');
87        $('.mega-toggle-animated').attr('tabindex', '0');
88        $('.mega-menu-link').attr('tabindex', '0');
89		//$('.mega-sub-menu').attr('tabindex', '0');
90});
91
92jQuery(document).ready(function($){
93	$(document).ready(function() {
94		$('#mega-menu-primary li:last-child a').on('focusout', function() {
95			if($("#mega-menu-primary > .mega-toggle-on > ul li").hasClass("mega-toggle-on")) {
96				$('#mega-menu-primary > .mega-toggle-on > .mega-sub-menu > .mega-toggle-on > span').focus();
97			  	console.log("sub-sub-sub-menu on");
98			}
99			
100			else if ($("#mega-menu-primary > li").hasClass("mega-toggle-on")) {
101			  	$('#mega-menu-primary > .mega-toggle-on > span').focus();
102			  	//$(this).parent().closest('.mega-toggle-on').find('span').focus();
103			  	console.log("sub-menu on");
104			}	
105			
106			else{
107				$('#mega-menu-primary li:first-child a').focus();
108				console.log("sub-menua ei ole");
109			}
110		});
111	});
112});
113
114
115/*haku pois jos hakukenttä on tyhjä, ei haeta tyhjällä haulla*/
116jQuery(document).ready(function($){
117var checkInput = (e) => {
118  const content = $(".header_search_form input").val().trim();
119  $('.header_search_form button').prop('disabled', content === '');
120};
121
122
123$(document).on('keyup', '.header_search_form input', checkInput);
124});
125
126
127jQuery(document).ready(function($){
128	$('.mega-toggle-animated').click(function(){
129		$(".menu_social_mediaDiv1").css({"display": "block"});
130
131		if ($(".mega-menu-toggle").hasClass("mega-menu-open")) {
132		  $(".menu_social_mediaDiv1").css({"display": "none"});
133		}
134	});
135});
136
137jQuery(document).ready(function($){  
138  $('#searchTrigger').click(function(){
139	$(".menu_social_mediaDiv1").css({"display": "none"});
140  });
141});
142
143
144jQuery(document).ready(function($){
145if ($('html').is(':lang(fi)')) {
146    $(".cmplz-link.impressum").attr("aria-label", "Tietoa sivustosta");
147}	
148if ($('html').is(':lang(sv-SE)') || $('html').is(':lang(sv_SE)')) {
149    $(".cmplz-link.impressum").attr("aria-label", "Om webbplatsen");
150}
151if ($('html').is(':lang(en-US)') || $('html').is(':lang(en_US)')) {
152    $(".cmplz-link.impressum").attr("aria-label", "About the site");
153}
154});
155
156jQuery(document).ready(function($){
157$('.ajankohtaista-frontpage .gutentor-post-image-link').contents().filter(function(){
158    return this.nodeType === 3;
159}).remove();
160});

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.