JSFiddle - React, Tailwind, and code Playground

by straeger

JavaScript

$(function() {
    console.log('ready');
var $Iframe = $('<iframe>', {
                src: ""
            });

$('body').append($Iframe);
    $Iframe.load(function () {
        console.log($(this));
        console.log("loaded");
    });


    var urls = ["http://www.google.de","http://wwww.bing.de","http://www.heise.de"]

var index = 0;
            
setInterval(function () {
            console.log('interv' + index);
    $Iframe.attr('src', urls[index]);

    
    if(index== 3){
        index = 0;
    }else{
           index++;
    }
 
}, 1000);   
});