Yes it’s possible.
The way is the next:
-
Add a new data-id to all the elements of the list:
<ul class="selector-posts">
<li ... data-id="1" ...>
<li ... data-id="2" ...>
<li ... data-id="3" ...>
<li ... data-id="4" ...>
</ul>
-
Add the next code in the file “script.js” about the line 436:
setInterval(function() {
var id = $(".blog-news-selector .recent-posts ul").find("li.selected").data('id');
var n = $(".blog-news-selector .recent-posts ul.selector-posts li").length;
console.log("id: " + id + " / n: " + n);
if (id == n) {
postDetail($(".selector-posts li:eq(0)"));
} else {
postDetail($(".selector-posts li:eq(" + id + ")"));
}
}, 5000);
Anyway, I have sent you a zip file with the changes in the file “home3.html” and “script.js”.
Regards