PageSourceSearch

https://colorevo.jp/wp-content/themes/color-revo/assets/js/jquery.cmn.js

js colorevo.jp collected 2026-10-02 22:38:40 UTC 1,593 bytes, 68 lines download raw bytes

1// JavaScript Document
2
3var ifHide = true;
4$(window).scroll(function(){
5	if($(window).scrollTop() < 300 && ifHide==false){
6		$("#pagetop").animate({bottom:-50});
7		ifHide = true;
8	} else if ($(window).scrollTop() > 300 && ifHide==true){
9		$("#pagetop").animate({bottom:0});
10		ifHide = false;
11	}
12});
13
14$(function() {
15  $(window).on('scroll', function() {
16    if ($(this).scrollTop() > 50) {
17      $('#header').addClass('fixed');
18    } else {
19      $('#header').removeClass('fixed');
20    }
21  });
22});
23
24$(window).on('load', function() {
25	_pageScroll();
26	if ($(window).width() < 1180) {
27		_setSpMenu();
28	}
29});
30
31
32/* ページ内リンク */
33function _pageScroll(){
34	$('a[href^="#"]').click(function() {
35		if ($(window).width() < 768) {
36			var headerHeight = 80;
37		} else {
38			var headerHeight = 150;
39		}
40    var speed = 300;
41    var href= $(this).attr("href");
42    var target = $(href == "#" || href == "" ? 'html' : href);
43		var position = target.offset().top-headerHeight;
44    $('body,html').animate({scrollTop:position}, speed, 'swing');
45		if ($(window).width() < 768) {
46			$("#navi_ul").slideUp();
47			$("#navi_ul").removeClass("active");
48		}
49    return false;
50	});
51}
52
53/* レスポンシブナビ */
54function _setSpMenu(){
55	$("#navi_ul").hide();
56	var flg = "close";
57	$(".menuBtn").click(function() {
58		if($("#navi_ul").hasClass("active")) {
59			$("#navi_ul").slideUp("slow");
60			$("#navi_ul").removeClass("active");
61			$(".menuBtn").removeClass("menu-open");
62    } else {
63			$("#navi_ul").slideDown("slow");
64			$("#navi_ul").addClass("active");
65			$(".menuBtn").addClass("menu-open");
66    }
67	});
68}

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.