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

質問編集履歴

1

ソース追加

2016/03/14 06:12

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -1,3 +1,42 @@
1
1
  railsで.hoverを使っているコンテンツをinfinitescrollで表示させているのですが、スクロールして後から読み込まれてくるコンテンツに.hoverが効いてくれません。
2
2
 
3
+ ```rails
4
+ .prototype
5
+ .col-sm-4.col-md-3.proto-content
6
+ .thumbnail
7
+ - if current_user.id == prototype.user_id
8
+ .user_operation
9
+ %ul.operation_list
10
+ %li
11
+ = link_to 'edit', edit_prototype_path(prototype)
12
+ %li
13
+ = link_to 'delete', prototype_path(prototype), method: :delete
14
+ = link_to image_tag(prototype.thumbnails.first.thumbnail.url), prototype_path(prototype)
15
+ .caption
16
+ %h3= prototype.title
17
+ .proto-meta
18
+ .proto-user
19
+ = link_to prototype.user.name, user_path(prototype.user)
20
+ .proto-posted
21
+ = prototype.created_at.strftime('%b %d')
22
+ %ul.proto-tag-list.list-inline
23
+ - prototype.tags.each do |tag|
24
+ %li
25
+ .btn.btn-default= link_to tag.name, tag_path(tag)
26
+
27
+ ```
28
+
29
+ ```js
30
+ $(document).ready(function(){
31
+ $('.thumbnail').hover(
32
+ function(){
33
+ $(this).find('.operation_list').css('display', 'block');
34
+ },
35
+ function(){
36
+ $('.operation_list').css('display', 'none');
37
+ }
38
+ );
39
+ });
40
+ ```
41
+
3
42
  どなたか対応策知っておられる方お願いいたします。