Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="bs-example">
- <a href="#videoModal2" target="_blank" class="ga_track wp-read" data-toggle="modal">WATCH VIDEO <span class="next-arrow"></span> <span class="next-arrow"></span></a>
- <!-- Modal HTML -->
- <div id="videoModal2" class="modal fade">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
- </div>
- <div class="modal-body">
- <iframe class="youtubeplayer" width="100%" height="315" src="https://www.youtube.com/embed/..." frameborder="0" allowfullscreen></iframe>
- </div>
- </div>
- </div>
- </div>
- </div>
- $(document).ready(function(){
- $('.modal').each(function(){
- var src = $(this).find('iframe').attr('src');
- $(this).on('click', function(){
- $(this).find('iframe').attr('src', '');
- $(this).find('iframe').attr('src', src);
- });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement