1// scroll-display inview 2$(window).on('load scroll', function () { 3 var targetObject = $('.object-fadein'); 4 var animation = 'animation'; 5 targetObject.each(function () { 6 var boxOffset = $(this).offset().top; 7 var scrollPos = $(window).scrollTop(); 8 var windowHeight = $(window).height(); 9 if (scrollPos > boxOffset - windowHeight + 300) { 10 $(this).addClass(animation); 11 } 12 }); 13}); 14 15// @end inview 16 17 18// menu accordion 19$(function () { 20 $(".menu-button").on("click", function () { 21 $("nav").toggleClass("active"); 22 $(this).toggleClass("active"); 23 $(".menu-button div.label").toggleClass("open"); 24 }); 25}); 26 27// return scroll 28$(function () { 29 var topBtn = $('div.scroller'); 30 topBtn.click(function () { 31 $('body,html').animate({ 32 scrollTop: 0 33 }, 500); 34 return false; 35 }); 36}); 37 38// scroll 39$(function () { 40 var $anchors = $("a.scrolls[href^='#'],area.scrolls[href^='#']"); 41 $anchors.each(function () { 42 var $anchor = $(this); 43 var anchorID = $anchor.attr("href"); 44 var $target = $(anchorID); 45 $anchor.click(function (e) { 46 var targetPositionTop = $target.offset().top; 47 $('html, body').stop().animate({ 48 scrollTop: targetPositionTop - 50 49 }, 500); 50 return false; 51 }); 52 }); 53}); 54 55 56// resize 57/*$(window).on("resize", function () { 58 var w = $(window).width(); 59 if (w >= 768) { 60 $() 61 } 62});*/ 63 64// .tel-link 65$(function () { 66 var ua = navigator.userAgent.toLowerCase(); 67 var isMobile = /iphone/.test(ua) || /android(.+)?mobile/.test(ua); 68 if (!isMobile) { 69 $('a[href^="tel:"]').on('click', function (e) { 70 e.preventDefault(); 71 }); 72 } 73 // if (isMobile) { 74 // $('a#tabikura_url').each(function() { 75 // $(this).attr('href', 'http://yoyaku.tottori-guide.jp/dom/ss/?pf=31'); 76 // }); 77 // } 78}); 79 80 81// description clamp 82/* 83$(document).ready(function(){ 84 $("").each(function(){ 85 var textLimit = 30; 86 var description = $(this).text(); 87 var description_sub = description.substring(0,textLimit); 88 if(description.length > textLimit) 89 $(this).html( description_sub + "<span>â¦[ç¶ããã¿ã]</span>" ); 90 }); 91}); 92*/ 93 94// scroll add class header 95$(function () { 96 // var header = $('header'); 97 $(window).scroll(function () { 98 if ($(this).scrollTop() > 0) { 99 $("header").addClass('opacity'); 100 $(".wrapper").addClass('opacity'); 101 } else { 102 $("header").removeClass('opacity'); 103 $(".wrapper").removeClass('opacity'); 104 } 105 }); 106}); 107 108/*--------------------------------------------------------------------------* 109 * 110 * footerFixed.js 111 * 112 * MIT-style license. 113 * 114 * 2007 Kazuma Nishihata [to-R] 115 * http://blog.webcreativepark.net 116 * 117 *--------------------------------------------------------------------------*/ 118 119new function () { 120 121 var footerId = "footer"; 122 123 function footerFixed() { 124 var dh = document.getElementsByTagName("body")[0].clientHeight; 125 document.getElementById(footerId).style.top = "0px"; 126 var ft = document.getElementById(footerId).offsetTop; 127 var fh = document.getElementById(footerId).offsetHeight; 128 if (window.innerHeight) { 129 var wh = window.innerHeight; 130 } else if (document.documentElement && document.documentElement.clientHeight != 0) { 131 var wh = document.documentElement.clientHeight; 132 } 133 if (ft + fh < wh) { 134 document.getElementById(footerId).style.position = "relative"; 135 document.getElementById(footerId).style.top = (wh - fh - ft - 1) + "px"; 136 } 137 } 138 139 function checkFontSize(func) { 140 141 var e = document.createElement("div"); 142 var s = document.createTextNode("S"); 143 e.appendChild(s); 144 e.style.visibility = "hidden" 145 e.style.position = "absolute" 146 e.style.top = "0" 147 document.body.appendChild(e); 148 var defHeight = e.offsetHeight; 149 150 function checkBoxSize() { 151 if (defHeight != e.offsetHeight) { 152 func(); 153 defHeight = e.offsetHeight; 154 } 155 } 156 setInterval(checkBoxSize, 1000) 157 } 158 159 function addEvent(elm, listener, fn) { 160 try { 161 elm.addEventListener(listener, fn, false); 162 } catch (e) { 163 elm.attachEvent("on" + listener, fn); 164 } 165 } 166 167 addEvent(window, "load", footerFixed); 168 addEvent(window, "load", function () { 169 checkFontSize(footerFixed); 170 }); 171 addEvent(window, "resize", footerFixed); 172 173} 174 175 176 177/*URLå¥classåãæ¿ã*/ 178$(function(){ 179var str = location.href+''; 180if( str.indexOf('?test')!=-1 ) {$('html').addClass("test"); $('body').addClass("test"); } //æ ¡æ£ç¨ 181else if( str.indexOf('34123.html')!=-1 || str.indexOf('cool-summer')!=-1 ) { $('body').addClass("wide"); } //æ ¡æ£ç¨ 182}); 183
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.