1( function( $ ) { 2 3 $(window).on('load resize', function() { 4 var windowWidth = window.innerWidth; 5 var windowHeight = window.innerHeight; 6 var state = false; 7 var scrollpos; 8 9 var _touch = ('ontouchstart' in document) ? 'touchstart' : 'click'; 10 11 if ( windowWidth < 1000 ) { 12 $('.mobile_menu').css('height', $('body').height() + 'px'); 13 $('.mobile_menu_wrap').css('height', windowHeight + 'px'); 14 $(document).on( _touch, '.menu-trigger', function(){ 15 16 if(state == false) { 17 scrollpos = $(window).scrollTop(); 18 $('body').addClass('body-fixed').css({'top': -scrollpos}); 19 $('.site').addClass('menu-on'); 20 state = true; 21 } else { 22 $('body').removeClass('body-fixed').css({'top': 0}); 23 window.scrollTo( 0 , scrollpos ); 24 $('.site').removeClass('menu-on'); 25 state = false; 26 } 27 }); 28 } else { 29 $('.site').removeClass('menu-on'); 30 $('.mobile_menu_wrap,.mobile_menu').css('height', ''); 31 } 32 }); 33 34 35 $( document ).ready( function() { 36 var windowWidth = window.innerWidth; 37 var cat_over = $('.category-area .cat_box .over').outerHeight(); 38 39 if ( 1000 <= windowWidth ) { 40 $('.category-area .cat_box .over').css('bottom', '-' + cat_over + 'px'); 41 } 42 43 } ); 44 45 $(window).scroll(function() { 46 var windowWidth = window.innerWidth; 47 var site = $('.site'); 48 var header = $('.site-header'); 49 var headerH = $('.fixed-box').outerHeight(); 50 51 if ( 1000 <= windowWidth ) { 52 $('.site').removeClass('menu-on'); 53 /* pc -*/ 54 if ($(this).scrollTop() > headerH) { 55 56 site.css('margin-top', headerH); 57 header.addClass('fixed'); 58 59 if ($(this).scrollTop() > headerH*10) { 60 header.addClass('open'); 61 } else { 62 header.removeClass('open'); 63 } 64 65 } else { 66 site.css('margin-top', '0'); 67 header.removeClass('fixed'); 68 69 } 70 }else if( windowWidth < 1000 ) { 71 72 /* mobile -*/ 73 74 if ($(this).scrollTop() > headerH) { 75 site.css('margin-top', headerH); 76 header.addClass('fixed'); 77 78 if ($(this).scrollTop() > headerH*4) { 79 header.addClass('open'); 80 } else { 81 header.removeClass('open'); 82 } 83 84 } else { 85 site.css('margin-top', '0'); 86 header.removeClass('fixed open'); 87 } 88 89 } 90 91 }); 92 93 $(function() { 94 var pair = location.search.substring(1).split('&'); 95 var arg = new Object; 96 for( var i = 0; pair[i]; i++ ) { 97 var kv = pair[i].split('='); 98 arg[kv[0]] = kv[1]; 99 } 100 if( undefined != arg.from_item && undefined != arg.from_sku ) { 101 $('.wpcf7-submit').on('click', function() { 102 var form = $(this).parents('form'); 103 form.attr('action', $(this).data('action')); 104 $('<input>').attr({ 105 'type': 'hidden', 106 'name': 'from_item', 107 'value': arg.from_item 108 }).appendTo(form); 109 $('<input>').attr({ 110 'type': 'hidden', 111 'name': 'from_sku', 112 'value': arg.from_sku 113 }).appendTo(form); 114 }); 115 } 116 }) 117 118} )( jQuery );
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.