Currently I have four pages that are full-width landing pages. I would like to add funcionality that will enable auto play. This will change the functionality to be more like a slideshow and less like static landing pages.
My current navigation for my landing pages has a " current navigation item selector;" here is my code for my current navigation that I'd like to add a jquery autoplay feature to:
$(document).ready(function() {
/** nav selector **/
var bodyid = $('body').attr('id');
$('nav a.'+ bodyid).addClass('active');
$("body").css("display", "none");
$("body").fadeIn(500);
$("a").click(function(event){
event.preventDefault();
linkLocation = this.href;
$("body").fadeOut(500, redirectPage);
});
function redirectPage() {
window.location = linkLocation;
}
});
Here is my HTML for the Nav:
Here is my CSS:
nav {
position:absolute;
top:4%;
left:10.45%;
}
nav a {
float:left;
display: inline-block;
width: 15px;
height: 15px;
margin: 0 7px;
background: #fff;
opacity: .85;
border-radius: 999px;
cursor: pointer;
transition: all 150ms;
}
nav a:hover, nav a.active{
opacity:1;
background:#007cc0;
}