回答編集履歴

1

chousei

2019/09/20 11:05

投稿

yambejp
yambejp

スコア114843

test CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  <style>
8
8
 
9
- #hoge{width:100%,height:300px;background-Color:red;color:white;font-size:10em;}
9
+ #hoge,#fuga{width:100%,height:300px;background-Color:red;color:white;font-size:10em;}
10
10
 
11
11
  </style>
12
12
 
@@ -20,6 +20,22 @@
20
20
 
21
21
  $('#hoge').hide().show("slide", {direction: "left"}, 1000);
22
22
 
23
+ $('#fuga').after($('<div>').css({
24
+
25
+ height:$('#fuga').height(),
26
+
27
+ width:$('#fuga').width(),
28
+
29
+ backgroundColor:'white',
30
+
31
+ position:'absolute',
32
+
33
+ top:$('#fuga').offset().top,
34
+
35
+ }));
36
+
37
+ $('#fuga').next('div').hide("slide", {direction: "right"}, 1000);
38
+
23
39
  });
24
40
 
25
41
  </script>
@@ -30,34 +46,8 @@
30
46
 
31
47
  test
32
48
 
33
- ```
49
+ <div id="fuga">fugafuga</div>
34
50
 
35
-
36
-
37
- サンプルのやつは上になんかかぶせているのを取っているだけにもみえますね
38
-
39
- ```javascript
40
-
41
- $(function(){
42
-
43
- $('#hoge').after($('<div>').css({
44
-
45
- height:$('#hoge').height(),
46
-
47
- width:$('#hoge').width(),
48
-
49
- backgroundColor:'white',
50
-
51
- position:'absolute',
52
-
53
- top:$('#hoge').offset().top,
54
-
55
- }));
51
+ test
56
-
57
- $('#hoge').next('div').hide("slide", {direction: "right"}, 1000);
58
-
59
- });
60
-
61
-
62
52
 
63
53
  ```