I'm trying to make glyphicon icon appear every time I hover my mouse over it. And I'm using <span> tag for it. But this refuses to work. What have I done wrong?
application.scss
/*
*= require bootstrap3-editable/bootstrap-editable
*= require bootstrap-datepicker3
*= require_tree .
*/
@import "bootstrap-sprockets";
@import "bootstrap";
.hovering:before {
display: none;
}
.hovering:hover:before {
display: block;
}
In my view file it looks like this:
<span class='hovering'>
<%= link_to user_task_path(current_user, task.id), method: :delete,
data: { confirm: 'Are you sure?' }, remote: true do %>
<i class="glyphicon glyphicon-trash"></i>
<% end %>
</span>
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire