javascript - How can I make toggleClass("hover") fade in? -
i've been googling no success. part of page fade in when hover on it.
here's css:
.status .admin { display: none; } .status.hover .admin { display: inline; }
here's .coffee script:
$('.status').hover (event) -> $(this).toggleclass("hover")
for task makes sense go pure css transitioning opacity:
.status .admin { opacity: 0; -webkit-transition: .7s ease; transition: .7s ease; } .status:hover .admin { display: inline; opacity: 1; }
<div class="status"> status <span class="admin">admin</span> </div>
Comments
Post a Comment