1(function( $ ) { 2 "use strict"; 3 //$(document).foundation(); 4 $(document).ready( function(){ 5 6 $( ".hampurilaisvalikko" ).click(function() { 7 $('.paavalikko').slideToggle(600); 8 }); 9 10 $( ".hakunappi" ).click(function() { 11 console.log("testi"); 12 $('.mobile_hakuosio').addClass("nayta"); 13 }); 14 15 $(".mobile_hakuosio").click(function(e) { 16 if($(e.target).hasClass("mobile_hakuosio") || $(e.target).hasClass("ikoni_sulje")) { 17 $(".mobile_hakuosio").removeClass("nayta"); 18 } 19 }); 20 21 $(".sivupalkki_otsikko").click(function(e) { 22 var pituus = $( window ).width(); 23 if(pituus < 900) { 24 $(".paasisalto_sivupalkki > ul").slideToggle(500); 25 } 26 }); 27 28 $(".kategoriat").change(function() { 29 var valittu = $(".kategoriat").val(); 30 if(valittu == 0 || valittu == '0') { 31 $(".yhteyshenkilot_kategoria").show(); 32 } else { 33 $(".yhteyshenkilot_kategoria").hide(); 34 $("#" + valittu).show(); 35 } 36 }); 37 38 /* TAVALLINEN */ 39 $( ".paasisalto_sivupalkki ul > li.menu-item-has-children > a" ).click(function( event ) { 40 //console.log("Testi"); 41 if(!$(this).parent("li").hasClass("current-menu-item") ) { 42 //console.log($(this).parent(".menu-item-has-children").children(".sub-menu").css('display')); 43 //if($(this).parent(".menu-item-has-children").children(".sub-menu-wrapper").css('display') == 'none') { 44 if(!$(this).parent(".menu-item-has-children").hasClass('.current-menu-ancestor')) { 45 if($(this).parent(".menu-item-has-children").children(".sub-menu").css('display') == 'none') { 46 event.preventDefault(); 47 $(this).parent(".menu-item-has-children").children(".sub-menu").slideDown(); 48 } 49 } 50 } 51 }); 52 53 $( ".ylaosio_logo" ).keydown(function( event ) { 54 switch(event.which) { 55 case 39 : //Arrow right 56 $(".avaahaku_prompt").addClass("nayta"); 57 $(".avaahaku_prompt").focus(); 58 event.preventDefault(); 59 break; 60 61 case 40 : //Arrow down 62 $(".paavalikko ul > li:first-child a").focus(); 63 event.preventDefault(); 64 break; 65 } 66 }); 67 68 $( ".avaahaku_prompt" ).keydown(function( event ) { 69 event.preventDefault(); 70 switch(event.which) { 71 case 13 : //Enter 72 case 32 : //Space 73 $(".hae_hakusana").focus(); 74 break; 75 76 case 37 : //Arrow left 77 $(".ylaosio_logo").focus(); 78 break; 79 80 case 39 : //Arrow right 81 $(".inenglish").focus(); 82 break; 83 84 case 40 : //Arrow down 85 $(".paavalikko ul > li:nth-child(5) a").focus(); 86 break; 87 } 88 $(".avaahaku_prompt").removeClass("nayta"); 89 }); 90 91 $( ".inenglish" ).keydown(function( event ) { 92 switch(event.which) { 93 case 37 : //Arrow left 94 $(".avaahaku_prompt").addClass("nayta"); 95 $(".avaahaku_prompt").focus(); 96 event.preventDefault(); 97 break; 98 99 case 39 : //Arrow right 100 $(".ylaosa_fb").focus(); 101 event.preventDefault(); 102 break; 103 104 case 40 : //Arrow down 105 $(".paavalikko ul > li:nth-last-child(3) a").focus(); 106 event.preventDefault(); 107 break; 108 } 109 }); 110 111 $( ".ylaosa_fb" ).keydown(function( event ) { 112 switch(event.which) { 113 case 37 : //Arrow left 114 $(".inenglish").focus(); 115 event.preventDefault(); 116 break; 117 118 case 39 : //Arrow right 119 $(".ylaosa_ig").focus(); 120 event.preventDefault(); 121 break; 122 123 case 40 : //Arrow down 124 $(".paavalikko ul > li:nth-last-child(2) a").focus(); 125 event.preventDefault(); 126 break; 127 } 128 }); 129 130 $( ".ylaosa_ig" ).keydown(function( event ) { 131 switch(event.which) { 132 case 37 : //Arrow left 133 $(".ylaosa_fb").focus(); 134 event.preventDefault(); 135 break; 136 137 case 39 : //Arrow right 138 $(".paavalikko ul > li:first-child a").focus(); 139 event.preventDefault(); 140 break; 141 142 case 40 : //Arrow down 143 $(".paavalikko ul > li:nth-last-child(2) a").focus(); 144 event.preventDefault(); 145 break; 146 } 147 }); 148 149 $( ".paavalikko ul > li" ).keydown(function( event ) { 150 var $this = $(this); 151 var index = $this.index(); 152 switch(event.which) { 153 case 37 : //Arrow left 154 var seuraava = $(this).prev("li").attr("id"); 155 $("#" + seuraava + " a").focus(); 156 event.preventDefault(); 157 break; 158 159 case 39 : //Arrow right 160 var seuraava = $(this).next("li").attr("id"); 161 $("#" + seuraava + " a").focus(); 162 event.preventDefault(); 163 break; 164
165 case 38 : //Arrow up 166 if(index >= 0 && index <= 2) { 167 $(".ylaosio_logo").focus(); 168 } else if(index >= 3 && index <= 5) { 169 $(".avaahaku_prompt").addClass("nayta"); 170 $(".avaahaku_prompt").focus(); 171 } else if(index == 6) { 172 $(".inenglish").focus(); 173 } else { 174 $(".ylaosa_ig").focus(); 175 } 176 event.preventDefault(); 177 break; 178 } 179 }); 180 181 /* 182 183 $j(document).mouseup(function (e) { 184 //koodi 185 }); 186 187 // 188 189 $j( window ).resize(function() { 190 //koodi 191 }); 192 */ 193 }); 194})(jQuery); 195 196function resizeIframe(obj) { 197 obj.style.height = obj.contentWindow.document.documentElement.scrollHeight + 'px'; 198}
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.