There is a task: when you click on the preview, get a video in a modal window.
I implement it as indicated in the code below, but it works only once: if you close it with a mouse click in an empty area or on a cross and click again on the thumbnail, the modal window starts up without content.
< script type = "text/javascript" src = "http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" > < /script> <script type="text/javascript " src=" / fancybox / jquery.mousewheel - 3.0.4.pack.js "> </script> <script type=" text / javascript " src=" / fancybox / jquery.fancybox - 1.3.4.pack.js "></script> <script type=" text / javascript "> $(document).ready(function() { $("# content ").fancybox({ 'titlePosition' : 'inside', 'transitionIn' : 'none', 'transitionOut' : 'none' }); }); </script>
<!DOCTYPE html> <html lang="en"> <head> <link rel="icon" href="/favicon.ico" type="image/x-icon"> <link rel="stylesheet" type="text/css" href="/fancybox/jquery.fancybox-1.3.4.css" media="screen" /> <link href='css/bootstrap.min.css' rel='stylesheet' media='screen'> <link rel="stylesheet" href="/css/myowncss.css"> <link rel="icon" href="/favicon.ico" type="image/x-icon"> <title>potato</title> </head> <body> <a id="content" href="#potato"> <img src="/video/logo.png" alt="potato"> </a> <div style="display: none; border: 1px"> <div id="potato" style="width:800px; height:auto; overflow:auto;"> <iframe width="800" height="600" src="https://youtu.be/XqXZwgG990I;" frameborder="0" allowfullscreen> </iframe> </div> </div> </body> </html>