Materializecss: carousel & slider not working

北城余情 提交于 2020-01-05 09:29:33

问题


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.

The carousel:

The slider:

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?


回答1:


Updating materializecss files solved the problem. I also found out that a part of materialize.css was missing.




回答2:


enter this script

    <script type="text/javascript">
    $(document).ready(function () {
        $('.carousel').carousel();

)}




回答3:


If you are using NOT default classes for carousel items - you need to change them classes in carousel.js file



来源:https://stackoverflow.com/questions/36136311/materializecss-carousel-slider-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!