Search
 
SCRIPT & CODE EXAMPLE
 

HTML

onclick video popup in html codepen

//html
<div id="button"></div>
<div id="video" style="display:none;>
  <video width="200" height="150" controls>
	<source src="vid.mp4" type="video/mp4">
</div>

//javascript
document.getElementById('button').addEventListner('click', function(){
	let video = document.getElementById('video');
  
  	function showVideo(){
    video.style.display = "block";
    }
  
  	function hideVideo(){
    video.style.display = "none"
    }
  
  showVideo();
  hideVideo();
}
Comment

PREVIOUS NEXT
Code Example
Html :: random number text in html 
Html :: xss html 
Html :: navbar in rows in bootstrap 
Html :: flex inside flex mr-auto not working 
Html :: pass button value to javascript function 
Html :: how to start in html 
Html :: BEM example html 
Html :: regex cheat sheet 
Html :: data table in html code 
Html :: tailwind cards 
Html :: ubuntu 16.04 vmware 
Html :: table collapse row html 
Html :: is jeremy ugly 
Html :: servicenow jelly debug 
Html :: Double quotation for meta tag strings on html 
Html :: como fazer placeholder que vira label 
Html :: html script source 
Html :: Search CSV files for text 
Html :: laravel route explicit binding 
Html :: how to create div with class in vs code html shortcut 
Html :: attribut html 
Html :: label input mdn 
Html :: dont ignore space tag html 
Html :: how to inser code in html 
Html :: form filling progress bar html5 
Html :: make a link of index in previous folder 
Html :: control icon size html 
Html :: html barcode scanner 
Html :: collapsableTableColumns 
Html :: tag to custom theme 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =