Created
April 22, 2018 11:08
-
-
Save wainori2199/495088417a3974cb473ab98427c09e29 to your computer and use it in GitHub Desktop.
YouTubeJava
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.12.3.min.js"></script> | |
<script>// <![CDATA[ | |
$('.youtube').click(function(){ | |
video = '<iframe src="'+ $(this).attr('data-video') +'" frameborder="0" width="480" height="270"></iframe>'; | |
$(this).replaceWith(video); | |
}); | |
// ]]></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment