Create A Responsive Popup Video Gallery Using HTML CSS And Vanilla Javascript

Create A Responsive Popup Video Gallery Using HTML CSS And Vanilla Javascript

Mr. Web Designer

2 года назад

48,012 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Ai Chan
Ai Chan - 20.10.2023 20:11

much loooove ❤❤❤❤

Ответить
N Augustus
N Augustus - 04.07.2023 09:45

Awesome tutorial. I really appreciated this. Question : How would you go about making it so after you open the video, you can click anywhere outside of the video to close it as opposed to only clicking the X to escape?

Ответить
suhail nexgeno
suhail nexgeno - 22.06.2023 08:23

Thank you my bro

Ответить
Buffalo Black
Buffalo Black - 21.06.2023 17:55

Why is it so hard to share the source code? It literally takes 2 seconds compared to all the time you spent recording yourself coding and uploading this video.

Ответить
Thom Draw
Thom Draw - 23.04.2023 00:11

When I click on the video to see it in the popup, the src is not updated according to the video but stays at "null" do you know what I can do?

Ответить
Never Mind
Never Mind - 20.04.2023 10:27

could you please upload the code to buy a coffee?

Ответить
Fidel Emilio Susana Jimenez
Fidel Emilio Susana Jimenez - 21.03.2023 18:23

👽😍😍

Ответить
José Angel
José Angel - 20.02.2023 10:19

Upload here the code Bro🙏😍

Ответить
OdhavSoftech
OdhavSoftech - 20.01.2023 21:18

js is not working...plz help

Ответить
vikram Bais
vikram Bais - 19.01.2023 15:50

one like for splendid work.. because of this i got alot of help in my project...

Ответить
Edbert Cadavero
Edbert Cadavero - 14.01.2023 23:49

works great but when i closed the popup video. the sound is still playing in the background.

Ответить
Farbil
Farbil - 22.12.2022 20:12

Thank you!
But I have a question, how can I add a title under the video?

Ответить
WanPixel Academy
WanPixel Academy - 05.12.2022 12:09

hey GUYS, here is the script to disable the video from playing in the background



<script>
document.querySelectorAll('.video-container video').forEach(vid => {

vid.onclick = () =>{
document.querySelector('.popup-video').style.display = 'block';
document.querySelector('.popup-video video').src = vid.getAttribute('src');
}
});

document.querySelector('.popup-video span').onclick = () => {
document.querySelector('.popup-video').style.display = 'none';
document.querySelector('.popup-video video').pause(); // add this code

}


</script>

Ответить
Anthony Valles
Anthony Valles - 17.11.2022 11:14

I tried your code but the foreach code in the Java script is not working, same video will popup even when I clicked the other one, then if I clicked the X button the video will still play

Ответить
Fajar Saputra
Fajar Saputra - 15.11.2022 20:02

Thanks For Tutor Sir

Ответить
Invisible Technician
Invisible Technician - 06.10.2022 13:46

How to upload new post this site.

Ответить
Manhtganf
Manhtganf - 24.09.2022 17:20

how to upload wizard ??? Please tutorials

Ответить
Michael John Aprahamian
Michael John Aprahamian - 20.09.2022 09:53

Ive gotten everything on this perfect but the span x button wont close the pop up video, i dont know what im doing wrong

Ответить
Apna Coding
Apna Coding - 14.09.2022 06:05

काय विडीयो बनवलेत हो खूपच छान 🙏
Sir all video name kye ahet ho sangal kye mala

Ответить
Together-Good StuffHappens
Together-Good StuffHappens - 28.07.2022 15:08

Thankyou for your great video Mr Web Designer, just what I am looking for.
Could you PLEASE help me with the close button of the popup not stopping the audio from playing after closing.
I note your earlier reply of using

closeVideo.onclick = () =>{
mainVideo.pause();
}

I have tried to add this to the code but not having any luck. Can you please advise the line number and is it in the INDEX or CSS file and the exact code and where to put this code to make this work.

Thankyou for your help in advance.🙂

Ответить
JND
JND - 12.07.2022 06:35

Wonderful so educational

Ответить
Yasir Naqvi
Yasir Naqvi - 22.06.2022 18:17

HI, Great tutorials.
How to add titles and tags with same responsive design ?
Thanks

Ответить
Abdellah Idalioua
Abdellah Idalioua - 14.06.2022 15:29

Source code please

Ответить
Ozodbek Boriboyev
Ozodbek Boriboyev - 06.06.2022 22:03

Thank you a lot. You helped to solve my problem! God bless you 🙏

Ответить
Dreysy.P.González
Dreysy.P.González - 03.06.2022 01:47

I loved the video, sorry, an error occurs to me, I can't close the video, the X doesn't work.
I am using iframe, but it doesn't close the videos.
Could you help me please.🥺

Ответить
سنګر سټوډيو Sangar studio
سنګر سټوډيو Sangar studio - 08.05.2022 11:59

Sourse code please

Ответить
سنګر سټوډيو Sangar studio
سنګر سټوډيو Sangar studio - 08.05.2022 11:57

I don't know how to thank you 😍

Ответить
Web Development
Web Development - 21.04.2022 16:35

hello can u tell me the right code becoues i cant close i dont know why
document.querySelectorAll('.video-container video').forEach(vid => {
vid.onclick = () =>{
document.querySelector('.popup-video').style.display = 'block';
document.querySelector('.popup-video video').src = vid.getAttribute('src');
}
});

document.querySelector('.popup-video span').onclick =() =>{
document.querySelector('.popup-video').style.display = 'none';
};
so where is the wrong code
can u write for me the right code

Ответить
SHORTS VIRAIS
SHORTS VIRAIS - 08.04.2022 14:27

ty <3

Ответить
RenkSel Albüm Tasarım
RenkSel Albüm Tasarım - 17.03.2022 23:02

It would be nice if you give the direct source codes. Our goal is just to add it to our site quickly and easily.

Ответить
Viane Phill
Viane Phill - 07.03.2022 08:22

can you give source/

Ответить
Esther Or
Esther Or - 26.02.2022 09:19

hey sir, great video! after closing the video, it doesn't pause. can you type the pause command here? thanks!!!

Ответить
salva
salva - 21.02.2022 20:16

it`s possible to create this popup with iframes?

Ответить
salva
salva - 03.02.2022 23:04

Hi, thanks for the tutorial!! When i click on a video it pops up but without showing the video, only a gray rectangle, and it only plays the small sized one.

Ответить
Sumon Datta
Sumon Datta - 25.12.2021 21:40

boss you are great❤

Ответить
BimaL Twayana
BimaL Twayana - 23.12.2021 08:59

please share the code..

Ответить
BimaL Twayana
BimaL Twayana - 23.12.2021 08:55

where is the audio for description?

Ответить
sabrina sung
sabrina sung - 01.11.2021 07:11

hi my video is working fine but after closing the video the sound is still playing how to fix this?

Ответить
BNIKI
BNIKI - 16.10.2021 17:45

Thank you for porviding this tutorial and many others on your channel. Appreciated

Ответить
Mariel
Mariel - 25.09.2021 13:50

Pls give code

Ответить
E Q
E Q - 12.08.2021 11:08

how do i add border to the span? I set the background as white, so that the border is no really visible

Ответить
Aniket Ashok Bhise
Aniket Ashok Bhise - 29.07.2021 13:30

😍😍😍

Ответить
Thi Nguyễn Đình
Thi Nguyễn Đình - 24.07.2021 16:49

so cool bro, tks

Ответить
Kartik
Kartik - 24.07.2021 08:44

Konse theme hai ye vs code me

Ответить
Trung Lê Kiên
Trung Lê Kiên - 23.07.2021 11:33

you're really fanstatic

Ответить
Karnataka Shushma
Karnataka Shushma - 23.07.2021 04:33

Your videos are really awesome 🔥.

Ответить
gousiya art
gousiya art - 22.07.2021 20:48

Assalamualaikum
Brothers e-commerce product image description hiden
Main image on click after open description
Please reply

Ответить