質問編集履歴
1
URLなど修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
ajaxで動的に生成した要素に対して、fancyboxを割り当てています。
|
3
3
|
本来できないらしいのですが、live関数を使うとできるとのことで、
|
4
4
|
一度liveで設定してから、それ自体にfancyboxを起動させています。
|
5
|
-
参考: https://2inc.org/blog/2012/03/02/1270/
|
5
|
+
参考: [https://2inc.org/blog/2012/03/02/1270/](https://2inc.org/blog/2012/03/02/1270/)
|
6
6
|
```
|
7
7
|
jQuery('.fancybox').live('click', function() {
|
8
8
|
jQuery.fancybox(this);
|
@@ -23,8 +23,9 @@
|
|
23
23
|
```
|
24
24
|
|
25
25
|
|
26
|
-
とすると、1回目のクリックでは何も起きず、2回目からfancyboxが起動してしまいます。
|
26
|
+
とすると、1回目のクリックでは何も起きず、2回目からfancyboxが起動してしまいます。サイズ指定もききません。
|
27
|
+
|
27
|
-
同じく https://2inc.org/blog/2012/03/02/1270/ を参考に、
|
28
|
+
同じく [https://2inc.org/blog/2012/03/02/1270/](https://2inc.org/blog/2012/03/02/1270/) を参考に、
|
28
29
|
```
|
29
30
|
jQuery('.fancybox').live('hover', function() { // 'click' -> 'hover'
|
30
31
|
jQuery(this).fancybox( {
|