質問編集履歴

2

改善

2016/01/07 14:27

投稿

pac894398
pac894398

スコア429

test CHANGED
File without changes
test CHANGED
@@ -3,62 +3,6 @@
3
3
 
4
4
 
5
5
  ```jsvascript
6
-
7
- $(function() {
8
-
9
-
10
-
11
- $('#side-menu').metisMenu();
12
-
13
-
14
-
15
- });
16
-
17
-
18
-
19
- //Loads the correct sidebar on window load,
20
-
21
- //collapses the sidebar on window resize.
22
-
23
- // Sets the min-height of #page-wrapper to window size
24
-
25
- $(function() {
26
-
27
- $(window).bind("load resize", function() {
28
-
29
- topOffset = 50;
30
-
31
- width = (this.window.innerWidth > 0) ? this.window.innerWidth : this.screen.width;
32
-
33
- if (width < 768) {
34
-
35
- $('div.navbar-collapse').addClass('collapse');
36
-
37
- topOffset = 100; // 2-row-menu
38
-
39
- } else {
40
-
41
- $('div.navbar-collapse').removeClass('collapse');
42
-
43
- }
44
-
45
-
46
-
47
- height = ((this.window.innerHeight > 0) ? this.window.innerHeight : this.screen.height) - 1;
48
-
49
- height = height - topOffset;
50
-
51
- if (height < 1) height = 1;
52
-
53
- if (height > topOffset) {
54
-
55
- $("#page-wrapper").css("min-height", (height) + "px");
56
-
57
- }
58
-
59
- });
60
-
61
-
62
6
 
63
7
  var url = window.location;
64
8
 

1

全般

2016/01/07 14:27

投稿

pac894398
pac894398

スコア429

test CHANGED
@@ -1 +1 @@
1
- 6行程のJSの解説をお願いします
1
+ JSの解説をお願いします
test CHANGED
@@ -3,6 +3,62 @@
3
3
 
4
4
 
5
5
  ```jsvascript
6
+
7
+ $(function() {
8
+
9
+
10
+
11
+ $('#side-menu').metisMenu();
12
+
13
+
14
+
15
+ });
16
+
17
+
18
+
19
+ //Loads the correct sidebar on window load,
20
+
21
+ //collapses the sidebar on window resize.
22
+
23
+ // Sets the min-height of #page-wrapper to window size
24
+
25
+ $(function() {
26
+
27
+ $(window).bind("load resize", function() {
28
+
29
+ topOffset = 50;
30
+
31
+ width = (this.window.innerWidth > 0) ? this.window.innerWidth : this.screen.width;
32
+
33
+ if (width < 768) {
34
+
35
+ $('div.navbar-collapse').addClass('collapse');
36
+
37
+ topOffset = 100; // 2-row-menu
38
+
39
+ } else {
40
+
41
+ $('div.navbar-collapse').removeClass('collapse');
42
+
43
+ }
44
+
45
+
46
+
47
+ height = ((this.window.innerHeight > 0) ? this.window.innerHeight : this.screen.height) - 1;
48
+
49
+ height = height - topOffset;
50
+
51
+ if (height < 1) height = 1;
52
+
53
+ if (height > topOffset) {
54
+
55
+ $("#page-wrapper").css("min-height", (height) + "px");
56
+
57
+ }
58
+
59
+ });
60
+
61
+
6
62
 
7
63
  var url = window.location;
8
64
 
@@ -20,4 +76,6 @@
20
76
 
21
77
  });
22
78
 
79
+
80
+
23
81
  ```