我现在有一个像这样的ajax按钮。
<% if current_user.following?(user) %>
<%= link_to(unfollow_user_path(user), :remote => true, :class => 'btn') do %>
Now Following
<% end %>
<% else %>
<%= link_to(follow_user_path(user) ,:remote => true, :class => 'btn btn-primary') do %>
Follow
<% end %>
<% end %>
当我将鼠标光标移到显示“正在关注”的按钮上时,我想显示这个。
<%= link_to(follow_user_path(user) ,:remote => true, :class => 'btn btn-danger') do %>
Un-Follow
<% end %>
如何使用 MouseOver 条件将此应用于我的视图?(仅当它显示“正在关注”时)