-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
53 lines (49 loc) · 1.37 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
var $discord_join_button = $("#discord-join-button");
var navigationOpenFlag = false;
var navButtonFlag = true;
var focusFlag = false;
/** {min}以上{max}未満の乱数を返す関数 */
function randomValue(min, max) {
return Math.random() * (max - min) + min;
}
/*jQuery*/
$(function() {
$("#title-img").fadeIn(1000 * 3);
$("#title-img").css('transform', 'translateY(0%)');
$("#title").fadeIn(4700);
$("#subtitle").fadeIn(2500);
$("#discord-join-button").click(function(){
$discord_join_button.css("box-shadow", "0px 3px rgb(0, 116, 67)");
$discord_join_button.text("|=+=< Joined >=+=|");
});
$(".news-contents").hover(
function() {
$(this).css('transform', 'rotate(' + randomValue(-7, 7) + 'deg)');
},
function() {
$(this).css('transform', 'rotate(0deg)');
}
);
});
$(function() {
$("#top_move").on('click touchstart', function () {
$('html,body').animate({
scrollTop: 0
}, 'swing');
return false;
});
});
/******その他******/
/* ▼ ハンバーガー*/
$(function() {
$('.nav-toggle').click(function(){
$(this).toggleClass('active');
if ($(this).hasClass('active')) {
$('.header-menu').addClass('active');
}
else {
$('.header-menu').removeClass('active');
}
});
});
/* ▲ ハンバーガー */