Penso que seja isto que você procura:

<!-- begin snippet: js hide: false -->

<!-- language: lang-js -->

    var tmp = new Array("1","2","3","4");
    var color = new Array("red", "green", "blue", "yellow");
    var myvar;
    var i = 0;
    							
    setInterval(function() {
        $( "#right" ).text(tmp.shift());
        $( "#right" ).css("background-color", color.shift());
    }, 5000);

<!-- language: lang-css -->

    #right {
        position: relative;
        float: left;
        margin: 0 5px 0 0;
        border: 1px solid black;
        width: 200px;
        height: 200px;
        overflow: hidden;
    }

    div.panel {
        position: absolute;
        height: 100%;
        width: 100%;
        display: none;
    }

<!-- language: lang-html -->

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

    <div id="right">
    </div>

<!-- end snippet -->