質問編集履歴
4
内容追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -12,6 +12,12 @@
|
|
12
12
|
なにか分かる方いましたら、
|
13
13
|
お願いいたします。
|
14
14
|
|
15
|
+
エラーにこう出ました。
|
16
|
+
GET https://sample-a.conohawing.com/js/slick.min.js net::ERR_ABORTED 404
|
17
|
+
|
18
|
+
js.js:21 Uncaught TypeError: $(...).slick is not a function
|
19
|
+
at js.js:21:16
|
20
|
+
いろいろ調べてきます。
|
15
21
|
|
16
22
|
```JS
|
17
23
|
$(function() {
|
3
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -8,6 +8,9 @@
|
|
8
8
|
|
9
9
|
https://pengi-n.co.jp/blog/coding-practice2-commentary/
|
10
10
|
これ通りにやっています。
|
11
|
+
|
12
|
+
なにか分かる方いましたら、
|
13
|
+
お願いいたします。
|
11
14
|
|
12
15
|
|
13
16
|
```JS
|
2
コードの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -8,3 +8,72 @@
|
|
8
8
|
|
9
9
|
https://pengi-n.co.jp/blog/coding-practice2-commentary/
|
10
10
|
これ通りにやっています。
|
11
|
+
|
12
|
+
|
13
|
+
```JS
|
14
|
+
$(function() {
|
15
|
+
var $win =$(window),
|
16
|
+
$fv =$('.Fv')
|
17
|
+
$header = $('.Header')
|
18
|
+
fvHeight = $fv.outerHeight(),
|
19
|
+
fixedClass = 'fixed';
|
20
|
+
|
21
|
+
$win.on('load scroll',function(){
|
22
|
+
var value = $(this).scrollTop();
|
23
|
+
if($win.width() > 768)
|
24
|
+
if ( value > fvHeight) {
|
25
|
+
$header.addClass(fixedClass);
|
26
|
+
}else{
|
27
|
+
$header.removeClass(fixedClass);
|
28
|
+
}
|
29
|
+
});
|
30
|
+
});
|
31
|
+
|
32
|
+
|
33
|
+
//ファーストビューのslider
|
34
|
+
$('.slider').slick({
|
35
|
+
autoplay: true,
|
36
|
+
autoplaySpeed: 2000,
|
37
|
+
speed: 1000,
|
38
|
+
fade: true,
|
39
|
+
cssEase: 'linear'
|
40
|
+
});
|
41
|
+
|
42
|
+
//ハンバーガーメニューの開閉
|
43
|
+
$('.Burger').on('click',function(){
|
44
|
+
$('.Header__nav').fadeToggle(300);
|
45
|
+
$('.Burger').toggleClass('cross');
|
46
|
+
$('body').toggleClass('noscroll');
|
47
|
+
});
|
48
|
+
|
49
|
+
```
|
50
|
+
|
51
|
+
```html
|
52
|
+
<html lang="ja">
|
53
|
+
<head>
|
54
|
+
<meta charset="UTF-8" />
|
55
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
56
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
57
|
+
<meta name="robots" content="noindex , nofollow" />
|
58
|
+
<title>Cresta Design | 快適なオフィスをデザインする会社</title>
|
59
|
+
|
60
|
+
<link
|
61
|
+
href="https://fonts.googleapis.com/css?family=Noto+Serif+JP:400,700|Noto+Serif:400,700,700i&display=swap&subset=japanese"
|
62
|
+
rel="stylesheet"
|
63
|
+
/>
|
64
|
+
<link rel="stylesheet" href="./css/reset.css" />
|
65
|
+
<link rel="stylesheet" href="./css/slick.css" />
|
66
|
+
<link rel="stylesheet" href="./css/css.css" />
|
67
|
+
</head>
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
(footerの下)
|
73
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
74
|
+
<script src="js/slick.min.js"></script>
|
75
|
+
<script src="js/js.js"></script>
|
76
|
+
|
77
|
+
```
|
78
|
+
|
79
|
+
|
1
誤時
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
ウェブサイトを作成しています。
|
2
2
|
本来はトップ画像が、横にスライドして、切り替わる仕様ですが、
|
3
3
|
ウェブにアップすると、切り替わりません。
|
4
|
-
ただ、ウェブにアップしない状態で開くと
|
4
|
+
ただ、ウェブにアップしない状態で開くと普通にスライドします。
|
5
5
|
|
6
6
|
スライドには、https://kenwheeler.github.io/slick/
|
7
7
|
これを使用してます。
|