skip to Main Content

Jquery – JavaScript, video trailer (including YouTube iframe) playback issue with hoover on flip cards' front side

<head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> </head> <main> <h1>TM</h1> <p>Game cards.</p> <p><a href="https://github.com/murattasci06"><i class="fab fa-github"></i></a></p> </main> <ul> <li class="card" onmouseenter="showTrailer('https://www.youtube.com/watch?v=rt-2cxAiPJk')"> <div class="card__flipper"> <div class="card__front"> <img src="https://gecbunlari.com/wp-content/uploads/2021/12/Spiderman-No-Way-Home.jpg" alt="Spiderman"> <p class="card__name"><span>Marvels</span><br>Spiderman</p> <p class="card__num">1</p> </div> <div class="card__back"> <svg height="180" width="180"> <circle cx="90" cy="90"…

VIEW QUESTION

Html – Iframe document write doesn't update JavaScript

Here's a basic HTML editor: var textarea = document.querySelector('textarea'), iframe = document.querySelector('iframe'); function preview() { var iframeDoc = iframe.contentDocument; iframeDoc.open(); iframeDoc.write(textarea.value); iframeDoc.close(); } textarea.addEventListener('input', preview); textarea, iframe { width: 400px; height: 300px; } <textarea></textarea> <iframe></iframe> DEMO It updates the HTML…

VIEW QUESTION
Back To Top
Search