teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

3

ソースの修正

2015/08/25 06:38

投稿

hiro421
hiro421

スコア63

title CHANGED
File without changes
body CHANGED
@@ -39,5 +39,5 @@
39
39
  $("+.acoCont", this).slideUp(200);
40
40
  }
41
41
  });
42
- $("+.acoCont .itemCarousel ul li").tile();
42
+ $(".acoCont .itemCarousel ul li").tile();
43
43
  ```

2

ソースの修正

2015/08/25 06:38

投稿

hiro421
hiro421

スコア63

title CHANGED
File without changes
body CHANGED
@@ -39,6 +39,5 @@
39
39
  $("+.acoCont", this).slideUp(200);
40
40
  }
41
41
  });
42
- var carouselContHeight = $("+.acoCont .itemCarousel ul li", this);
42
+ $("+.acoCont .itemCarousel ul li").tile();
43
- carouselContHeight.tile();
44
43
  ```

1

jsソースの追加

2015/08/25 06:37

投稿

hiro421
hiro421

スコア63

title CHANGED
File without changes
body CHANGED
@@ -7,4 +7,38 @@
7
7
 
8
8
  このようにdisplay:none;されている要素が出現した際にjsが効くようにするにはどのように記述すればいいのでしょうか。色々調べてみたのですが、いまいち要点が掴めないでおります。。
9
9
 
10
- ご教示何卒よろしくお願いいたします。
10
+ ご教示何卒よろしくお願いいたします。
11
+
12
+ 下記jsのソースになります。
13
+ tileという関数は上記のtile.jsを読み込ませてあります。
14
+
15
+ ```ここに言語を入力
16
+ $(".acoCont").css("display", "none");
17
+ $( '.triggerTap' ).on('click', function ()
18
+ {
19
+ var carouselCont = $("+.acoCont .itemCarousel", this).children(".owl-carousel");
20
+ setTimeout(function ()
21
+ {
22
+ carouselCont.owlCarousel(
23
+ {
24
+ loop : true,
25
+ nav : true,
26
+ navigation : true,
27
+ pagination : false,
28
+ rewindNav : false,
29
+ margin : 20,
30
+ items : 4,
31
+ });
32
+ }, 100);
33
+ if ($("+.acoCont", this).css("display") === "none")
34
+ {
35
+ $("+.acoCont", this).slideDown(200);
36
+ }
37
+ else
38
+ {
39
+ $("+.acoCont", this).slideUp(200);
40
+ }
41
+ });
42
+ var carouselContHeight = $("+.acoCont .itemCarousel ul li", this);
43
+ carouselContHeight.tile();
44
+ ```