F
F
furcifer2017-12-06 21:30:49
JavaScript
furcifer, 2017-12-06 21:30:49

Animation background-color: rgba('0', '0', '0', '0')?

Good evening! Animation doesn't work, what's wrong?

$('.order_wrap').mouseover(function(){ 
    $(this).find( '.mask' ).animate( {backgroundColor:  'rgba(0,0,0,0.4) ' });
  }); 
  $('.order_wrap').mouseout(function(){ 
    $(this).find( '.mask' ).animate( {backgroundColor:  'rgba(0,0,0,0.5)' });
  });

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Serj-One, 2017-12-06
@furcifer

.animatedoes not work for such parameters.
In general, animations in js are evil. Take out all the animations in css, and add/remove the state class through js.
It's global. In your case, I don’t see the need for js at all, the animation will work through css hover.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question