PageSourceSearch

http://www.azabu-skinclinic.com/camp/js/jquery.module.js

js azabu-skinclinic.com collected 2026-10-05 07:05:13 UTC 6,817 bytes, 267 lines download raw bytes

1/*
2 | ------------------------------------------
3 | JavaScript File
4 | ------------------------------------------
5 | Filename:module.js
6 | Copyright:gingdesign
7 |
8*/
9
10
11/*----------------------------------------------------*/
12/* ページ内リンク位置調整
13/*----------------------------------------------------*/
14/*$(function () {
15$('a[href^=#]').click(function(){
16var href= $(this).attr("href");
17var target = $(href == "#" || href == "" ? 'html' : href);
18var position = target.offset().top - 160;
19$("html, body").animate({scrollTop:position}, 500, "swing");
20return false;
21});
22});*/
23
24
25
26//ページ内スクロール
27/*$(function(){
28$('.scroll a , a.scroll').click(function(){
29var speed = 1000;
30var href= $(this).attr("href");
31var target = $(href == "#" || href == "" ? 'html' : href);
32var position = target.offset().top;
33$("html, body").animate({scrollTop:position}, speed, "swing");
34return false;
35});
36});
37
38if (location.hash) {
39	var speed = 1000;
40	var urlHash = location.hash;
41	var position = $(urlHash).offset().top;
42	//$("html, body").animate({scrollTop:position-142+'px'}, speed, "swing");
43	$("html, body").animate({scrollTop:position}, speed, "swing");
44};*/
45
46	
47		
48/*----------------------------------------------------*/
49/* ページトップスクロール
50/*----------------------------------------------------*/
51$(function() {
52var topBtn = $('#pagetop');
53topBtn.hide();
54$(window).scroll(function () {
55if ($(this).scrollTop() > 300) {
56topBtn.fadeIn();
57} else {
58topBtn.fadeOut();
59}
60});
61topBtn.click(function () {
62$('body,html').animate({
63scrollTop: 0
64}, 300);
65return false;
66});
67});
68
69
70/*--------------------------------------------------------------------------
71 ナビ固定
72---------------------------------------------------------------------------*/
73/*$(function($) {
74var nav = $('#sp-nav'),
75offset = nav.offset();
76$(window).scroll(function () {
77if($(window).scrollTop() > offset.top) {
78$("body").addClass('fixed');
79} else {
80$("body").removeClass('fixed');
81}
82});
83});*/
84
85// sp accordion
86	
87$(function(){
88//$("#sp-panel").hide();
89$("#sp-nav .btn span").click(function(){
90if ($(this).attr("class")=="open") {
91$(this).removeClass("open");
92//$("body").removeClass("active");
93$("#sp-panel").fadeOut(200);
94} else {
95$(this).addClass("open");
96//$("body").addClass("active");
97$("#sp-panel").fadeIn(200);
98var wt = $(window).scrollTop();
99var sh = $('#sp-nav').height();
100// fixedの時に指定
101if ( $("body").hasClass("fixed") ){
102$("#sp-panel dl").css({'top':wt+sh+'px'});
103} else {
104$("#sp-panel dl").css({'top':'123px'});
105}
106
107}
108return false;
109});
110
111
112
113
114/*$("#sp-nav .btn").on("click", function() {
115$("#sp-nav .menu").fadeIn(200);
116$(this).next().slideToggle(200);
117$(this).toggleClass("open");
118$("body").toggleClass("active");
119});*/
120});
121// bodyの高さ取得
122$(window).load(function(){
123var winH = $('body').height();
124$("#sp-panel").css({'height':winH});
125});
126// 背景クリックでメニュー非表示
127$("#sp-panel").click(function(){
128$("#sp-nav .btn span").removeClass("open");
129$(this).fadeOut(200);
130});
131
132
133
134/*----------------------------------------------------*/
135/* ユーザーエージェント
136/*----------------------------------------------------*/
137
138var getDevice = (function(){
139var ua = navigator.userAgent;
140if(ua.indexOf('iPhone') > 0 || ua.indexOf('iPod') > 0 || ua.indexOf('Android') > 0 && ua.indexOf('Mobile') > 0){
141/*-------------------------------------------------------------------------*/
142/* スマホの時
143/*-------------------------------------------------------------------------*/
144$('body').addClass('sp');
145
146/*----------------------------------------------------*/
147/* アコーディオンの設定
148/*----------------------------------------------------*/
149$(function(){
150// ddを消す
151$(".index .navi dd").hide(); //cssで消す
152// 本体
153$(".index .navi dt").on("click", function() {
154$(this).next().slideToggle();
155$(this).toggleClass("open");
156});
157});
158
159//return 'sp';
160}else if(ua.indexOf('iPad') > 0 || ua.indexOf('Android') > 0){
161/*-------------------------------------------------------------------------*/
162/* タブレットの時
163/*-------------------------------------------------------------------------*/
164$('body').addClass('tb');
165
166// pc accordion
167$(function() {
168//$('#dropdown li ul').hide();
169$(".acdon li").hover(function() {
170	$(this).children('ul').stop().slideDown(100);
171}, function() {
172	$(this).children('ul').stop().slideUp(100);
173});
174});
175
176//return 'tb';
177}else{
178/*-------------------------------------------------------------------------*/
179/* PCの時
180/*-------------------------------------------------------------------------*/
181$('body').addClass('pc');
182
183$(window).load(function() {
184$(".tile > div").tile(2);
185$(".tile > figure").tile(2);
186$(".tile3 > li").tile(3);
187$(".tile3dl > dl").tile(3);
188});
189
190//return 'pc';
191}
192})(); //消さない
193
194
195
196/* tab切り替え */
197$(function($){
198$('#pc-panel > div').hide();
199var index = $("#pc-panel > div").index(this);
200$('#pc-nav a').mouseover(function () {
201$('#pc-panel').show();
202//$('#pc-panel').animate( { height: 'show'}, 100 );
203$('#pc-panel > div').stop().hide().filter(this.rel).fadeIn();
204$('#pc-nav a').removeClass('active');
205$(this).addClass('active');
206}).filter(':eq(index)').mouseover();
207$('#header').mouseleave(function () {
208$('#pc-panel div').slideUp(100);
209$('#pc-nav a').removeClass('active');
210$('#pc-panel').hide();
211});
212});
213
214// hover
215/*$(function(){
216$('.hvr li').hover(
217function(){
218$(this).stop(true).fadeTo(0, 0.9).fadeTo('fast', 1.0);
219},
220function(){
221$(this).fadeTo('fast', 1.0);
222}
223);
224});*/
225
226
227
228/* メインリストにクラスを付与 */
229//$("ul.list li:nth-child(even)").addClass("even");
230//$("ul.list li:last-child").addClass("last");
231
232/* tableにクラスを付与 */
233//$("table.tbl01 tr:nth-child(odd)").addClass("odd");
234
235
236/* 一時的リンク無効 */
237/*$(function(){
238	$('.path li:first-child').html('<span>home</span>');
239});*/
240
241/*----------------------------------------------------*/
242/* ページ内リンク
243/*----------------------------------------------------*/
244$(window).load(function() {
245	var url = $(location).attr('href');
246	if (url.indexOf("?id=") == -1) {
247	// スムーズスクロール以外の処理(必要なら)
248	}else{
249	// スムーズスクロールの処理
250	var url_sp = url.split("?id=");
251	var hash   = '#' + url_sp[url_sp.length - 1];
252	var tgt    = $(hash);
253	var pos    = tgt.offset().top;
254	$("html, body").animate({scrollTop:pos-42+'px'}, 1000, "swing");
255	//$("html, body").animate({scrollTop:pos}, 1000, "swing");
256	}
257});
258
259/*----------------------------------------------------*/
260/* iOSデバイスの場合のみbodyにclass属性「ios」が付与される
261/*----------------------------------------------------*/
262document.addEventListener("DOMContentLoaded", function(event) {
263if(navigator.userAgent.match(/iPhone|iPad|iPod/)){
264document.getElementsByTagName("body")[0].classList.add("ios");
265}
266});
267

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.