Created
May 31, 2018 09:10
-
-
Save ozknozsrt/b78e1a2865bc2c68a69caa843fba1dd6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(".acctrigger").click(function() { | |
var target = $(this).attr('href'); | |
$('.acc-page').removeClass('active'); | |
$('.acctrigger').removeClass('active'); | |
$(target).addClass('active'); | |
var target = $(this).attr('href'); | |
$(this).addClass('active'); | |
return false; | |
}); | |
var slideIndex = 0; | |
showSlides(); | |
function showSlides() { | |
var i; | |
var slides = document.getElementsByClassName("acc-page"); | |
slideIndex++; | |
if (slideIndex > slides.length) { | |
slideIndex = 1 | |
} | |
for (i = 0; i < slides.length; i++) { | |
slides[i].className = slides[i].className.replace(" active", ""); | |
} | |
slides[slideIndex - 1].className += " active"; | |
setTimeout(showSlides, 4000); // Change image every 2 seconds | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment