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">
<input id="content-1" placeholder='Sample text 1' />

JavaScript

eachChange();

function eachChange(){
 var arr = new Array();
for (var i = 0; i < 5; i++) {
    arr.push('Sample text ' + i);
}
 $.each(arr, function (index, value) {
 setTimeout(function(){ change(value);}, index * 1000);
   
});
    

}

function change(value) {
    $('input').attr('placeholder', value);
}