jQuery代码: -
$('.cycle-status-update')
.on('mouseenter', (function(){
$(this).closest('.delete-status-update-link').show();
}))
.on('mouseleave', (function(){
$(this).closest('.delete-status-update-link').hide();
}))
html代码:-
.status-partial
-@user.status_updates.latest.limit(5).each do |status_update|
.row-fluid.cycle-status-update{:class => cycle("dark", "light")}
.row-fluid
.span11
= status_update.status
.span1
.delete-status-update-link
%strong= link_to "X", [@user,status_update], :remote => true, :method => :delete, :class => "delete-status-update"
.row-fluid
.time-ago-in-words
="#{time_ago_in_words(status_update.created_at)} ago"
这里可能是什么问题?