Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

CodePen Home Load iframe on click

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
    $('#button').click(function(){ 
        if(!$('#iframe').length) {
                $('#iframeHolder').html('<iframe id="iframe" src="//player.vimeo.com/video/90429499" width="700" height="450"></iframe>');
        }
    });   
});
</script>
 
<button id="button">Button</button>
<div id="iframeHolder"></div>
Comment

PREVIOUS NEXT
Code Example
Javascript :: phaser generate frame numbers 
Javascript :: getusermedia close stream 
Javascript :: start nodemon under wsl2 
Javascript :: react inlinle style set background image 
Javascript :: get time in google apps script 
Javascript :: quasar router authentication 
Javascript :: .env file example react native 
Javascript :: filtering in javascript 
Javascript :: input mask 9 number add 
Javascript :: slice javascript 
Javascript :: react-bootstrap problem-import new version 
Javascript :: how to access variables in a different script file 
Javascript :: obfuscate js code 
Javascript :: how to set image width and height dynamically in javascript 
Javascript :: new features of angular 11 
Javascript :: phaser aseprite animation 
Javascript :: Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.4.6/$injector/modulerr?p0=myApp 
Javascript :: Implementing state lifecycle in react class component 
Javascript :: how to fetch data from json file in flutter 
Javascript :: javascript strings vs numbers 
Javascript :: Assume that x is a char variable has been declared and already given a value. Write an expression whose value is true if and only if x is a upper-case letter. 
Javascript :: javascript length of array 
Javascript :: Add Multilanguage Support to React App 
Javascript :: How to remove CSS file using JavaScript 
Javascript :: JSON requests using API in Javascript 
Javascript :: shallow render in react 
Javascript :: on:click svelte arguments 
Javascript :: javascript find first element of array 
Javascript :: string to query string javascript 
Javascript :: angular property binding 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =