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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -