javascript - Youtube in jquery refreshed div? -
not sure if possible. lets assume setup:
index.html
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/ libs/jquery/1.3.0/jquery.min.js"></script> <script type="text/javascript"> var auto_refresh = setinterval( function () { $('#load').load('reload.php').fadein("slow"); }, 10000); // refresh every 10000 milliseconds </script> <body> <div id="load"> </div> </body> reload.php
<? echo '<iframe width="560" height="315" src="//www.youtube.com/embed/w77uk1ejcpy" frameborder="0" allowfullscreen></iframe>'; //just simple example.. ?> now restart video every 10 seconds. there anyway around this, video continue playing? yes, div needs refresh every 10 seconds, example, not full code.
thanks!
Comments
Post a Comment