I'm creating a very basic content slider in CSS3 however this question is regarding the jQuery part of it. My content structure is as follows:
<div class="slider>
<div class="container>
<div class="slides">
<div class="slide active"></div>
<div class="slide"></div>
<div class="slide"></div>
<div class="slide"></div>
<div class="slide"></div>
</div>
</div>
</div>
These slides have an opacity of 0 however when .active
is added to slide, I change the opacity to 1. What I'm trying to accomplish is moving the active class to each div every x seconds
.
if($('.slider').length) {
// Element exists
var height = $('.slide .col-md-8').outerHeight(),
slide = $('.slide'),
wait = 5000;
$('.slides').css('height', height);
slide.each(function() {
});
}
This is all I can come up with. I'm sorry if it's not enough, I'll also apologize if this is very easy to do and I'm just wasting your time. I've got to learn somewhere. I hope I don't get voted down, I'm trying to build up my rep with this awesome community of developers.