JSFiddle - React, Tailwind, and code Playground

by charaf11

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/ui-lightness/jquery-ui.css">
<br/>
Values : <input   />

JavaScript

var arr = new Array();
for (var i = 0; i <= 5; i++) {
    arr.push('Value ' + i);
}


function eachChange(){

 $.each(arr, function (index, value) {
 setTimeout(function(){ $('input').attr('placeholder', value);}, index * 1000); 
 });   

}
 eachChange();