Answer the question
In order to leave comments, you need to log in
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
.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 questionAsk a Question
731 491 924 answers to any question