Blog Post slider not working

What happens if you use .css("display","none") instead of .style.display = "none"?

So that it looks like this:

var myIndex = 0;
carousel();
function carousel() {
var i;
var listItem = document.getElementsByClassName("js--slider-item");

for(i = 0; i < listItem.length; i++) {
    listItem[i].css("display", "none");
}

myIndex++;

if(myIndex > listItem.length) {
    myIndex = 1;
}

listItem[myIndex-1].css("display", "block");
setTimeout(carousel, 3000);

}

And what do you get, if you console.log() you’re listItem[i]?

EDIT:

My bad, .css() is, of course, jQuery.