• 16-06-2020, 20:07:48
    #1
    Merhaba, https://www.w3schools.com/w3css/tryi...slideshow_self bunu kullanarak slayt yaptım. Manuel kaymakta ama 5saniye de kaymasını istiyorum ve ileri geri de yapacağım. Lütfen yardımcı olabilirmisiniz. Teşekkürler

    var slideIndex = 1;
    showDivs(slideIndex);
    
    function plusDivs(n) {
    showDivs(slideIndex += n);
    }
    
    function showDivs(n) {
    var i;
    var x = document.getElementsByClassName("mySlides");
    if (n > x.length) {slideIndex = 1}
    if (n < 1) {slideIndex = x.length}
    for (i = 0; i < x.length; i++) {
    x[i].style.display = "none";
    }
    x[slideIndex-1].style.display = "block";
    }
  • 16-06-2020, 20:18:08
    #2
    https://owlcarousel2.github.io/OwlCarousel2/

    direkt bunu kullan hocam daha iyi
  • 16-06-2020, 20:39:59
    #3
    KadirKC adlı üyeden alıntı: mesajı görüntüle
    https://owlcarousel2.github.io/OwlCarousel2/

    direkt bunu kullan hocam daha iyi
    teşekkür ederim ancak eski yapıdaki süre işini halletsek daha iyi olacak sanki..
  • 16-06-2020, 22:36:15
    #4
    setInterval(plusDivs, 5000, 1)
    Bu her 5000 milisaniyede (5 saniyede) bir plusDivs fonksiyonu 1 parametresi ile çağrılcaktır.
  • 16-06-2020, 23:28:55
    #5
    Alpzy adlı üyeden alıntı: mesajı görüntüle
    setInterval(plusDivs, 5000, 1)
    Bu her 5000 milisaniyede (5 saniyede) bir plusDivs fonksiyonu 1 parametresi ile çağrılcaktır.
    var slideIndex = 0;
    carousel();
    
    function plusDivs(n) {
    carousel(slideIndex += n);
    }
    
    function carousel() {
    var i;
    var x = document.getElementsByClassName("mySlides");
    for (i = 0; i < x.length; i++) {
    x[i].style.display = "none";
    }
    slideIndex++;
    if (slideIndex > x.length) {slideIndex = 1}
    x[slideIndex-1].style.display = "block";
    setTimeout(carousel, 10000); // Change image every 2 seconds
    }
    bu şekilde yaptım çalışıyor sorun yok, sağ yönde de ilerliyor ama geri olarak çalışmıyor..

    <button class="w3-button w3-display-left w3-black" onclick="plusDivs(-1)">❮</button>
    <button class="w3-button w3-display-right w3-black" onclick="plusDivs(1)">❯</button>