Template:Home/NowPlaying: Difference between revisions

Template page
No edit summary
No edit summary
Line 2: Line 2:
<div id="now-playing">
<div id="now-playing">
<h2>Now Playing</h2>
<h2>Now Playing</h2>
* {{#widget:YouTube|id=tfcf5pv3VfA|}}
<ul class="videolist">
* {{#widget:YouTube|id=EQ7ZgdSlQRs}}
<li>{{#widget:YouTube|id=tfcf5pv3VfA|}}</li>
<li>{{#widget:YouTube|id=EQ7ZgdSlQRs}}</li>
</ul>
<html>
<head>
<script>
$(".videolist> li").hide();
randomItem();
 
function randomItem(){
    for (var i = 0; i < 1; i++){
        var length = $(".videolist> li:not(:visible)").length;
        var random = Math.floor(Math.random() * length);
        $(".videolist> li:not(:visible)").eq(random).show();
    }
}
</script>
</div>
</div>
</head>
</html>

Revision as of 18:26, 16 April 2022

Now Playing