M
M
massef2016-05-27 22:43:46
JavaScript
massef, 2016-05-27 22:43:46

How to fade in/fade out video?

Hello.

Can you please tell me how to make the video fade in and out when changing the url?
I made an example, https://jsfiddle.net/Lwnf6cqh/ click on the links

Tried using fadeOut, fadeIn, didn't work

UPD: doper itself, now it works as it should https://jsfiddle.net/ts31yue2/1/ but I wonder how correct this is the code? I would be grateful if you could show me how.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
IceJOKER, 2016-05-27
@massef

Don't mix pure JS and jQuery.
https://jsfiddle.net/ts31yue2/2/ - here is a more competent option, there are dozens of different ways)

S
Seva Sargsyan, 2016-05-27
@sevasargsyan

))

P
profesor08, 2016-05-27
@profesor08

In order not to fence anything, you just need to place some div with a background color on top of the video. Here's how to animate it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question