Slider on DIV in javascript or css

0

I would like to know how I could make a slider menu or I do not know how to call it, I searched the internet but I can not find anything because I do not know how to define the truth, I would like to recommend some way of doing it, or some bookstore. What I would like to do that would scroll is the following:

I would like to click on the < or > to slide from one month to another, the block itself works but I do not know how to give the touch of the slider. I leave part of the code:

This is the html:

<body>
    <center>
        <table id="calendar">
            <caption>
                <div class="slick"></div> 
            </caption>
            <thead>
                <tr>
                    <th>LUNES</th><th>MARTES</th><th>MIERCOLES</th><th>JUEVES</th><th>VIERNES</th><th>SABADO</th><th>DOMINGO</th>
                </tr>
            </thead>
            <tbody>

            </tbody>
        </table>
    </center>
    <script src="slick/slick.min.js"></script>
    <script src="js/semanal.js"></script>
    <script>mostrarCalendario(actual.getFullYear(),actual.getMonth()+1);</script>
</body>

And the javascript part:

document.getElementById("calendar").getElementsByTagName("caption")[0].innerHTML="<div class='scroll'><div class='slick'>"+year+"</div><div class='slick'>"+meses[month-1]+"</div><div class='slick'><a style='color: #cccccc;' onclick='mostrarCalendario("+prevYear+","+prevMonth+")'>&lt;</a></div><div class='slick'><a style='color: #cccccc;' onclick='mostrarCalendario("+nextYear+","+nextMonth+")'>&gt;</a></div><div class='slick'>"+meses[month-3]+"</div><div class='slick'>"+meses[month+1]+"</div><div class='slick'>"+meses[month-2]+"</div><div class='slick'>"+meses[month]+"</div></div>";

Thanks for your help ... the truth is that I'm going crazy trying ... I tried the slick but I can not get it working ...

    
asked by Joume Parra 12.07.2018 в 18:42
source

0 answers