EDIT: I found out the solution. See my post at the bottom of the page.
I've created a template for joomla with materializecss. Everything works fine except the slider (which displays as a gray rectangle) and carousel which just shows images one after another as obsolete divs.
I've imported the jquery script before materializecss. I've also called the carousel.carousel(). The code for slider and carousel I used is same as on the Materializecss website in examples. Can anyone help?
Updating materializecss files solved the problem. I also found out that a part of materialize.css was missing.