JSFiddle - React, Tailwind, and code Playground
by thesystemrestart
HTML
<div class="description">
חדש1
</div>
<img src="#">
CSS
.newprod {color: #f00}
JavaScript
function fetchAjaxContent(msg, time) {
setTimeout(function() {
$.ajax({
type: "GET",
url: "ajax.php?msg=" + msg + "&p=" + Math.random(),
dataType: "xml",
success: function(xml) {
$(xml).find('msgs').each(function() {
var content = $(this).find('content').text();
var ftime = $(this).find('time').text();
$("#page-wrap").html(content);
});
msg = msg + 1;
if (msg = 4) msg = 1;
ftime = parseInt(ftime) * 1000;
alert(ftime);
fetchAjaxContent(msg, ftime);
},
error: alert("error");
});
}, time);
}