Nifty expandable carousel

Developer
Size
2,087 Kb
Views
36,432

How do I make an nifty expandable carousel?

What is a nifty expandable carousel? How do you make a nifty expandable carousel? This script and codes were developed by Adam T Pugh on 13 July 2022, Wednesday.

Nifty expandable carousel Previews

Nifty expandable carousel - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Nifty expandable carousel</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="action_btns"> <div id="prev"><</div> <div id="next">></div>
</div>
<div id="c_holder_outer"> <div id="c_holder_inner" style="left:0%"> <div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div><div class="c"></div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Nifty expandable carousel - Script Codes CSS Codes

#action_btns div{ background:grey; padding:10px; display:inline-block; color:white; margin:10px;
}
#action_btns { text-align:right;
}
.c{ width:25%; height:200px; background:grey; background-size:cover; display:inline-block; float:none;
}
#c_holder_outer{ overflow:hidden;
}
#c_holder_inner{ white-space: nowrap; word-spacing: 0; position: relative; -webkit-transition: left 0.5s ease-in-out; -moz-transition: left 0.5s ease-in-out; -o-transition: left 0.5s ease-in-out; transition: left 0.5s ease-in-out;
}

Nifty expandable carousel - Script Codes JS Codes

$(document).ready(function(){ $('.c').each(function(){ var url = 'url(http://lorempixel.com/400/200/?rand=' + Math.random() + ")"; $(this).css('background-image',url); }); $('#prev').click(function(){ var left= $('#c_holder_inner')[0].style.left; var new_percent = parseInt(left) + 100 + '%'; $('#c_holder_inner').css('left',new_percent); }); $('#next').click(function(){ var left= $('#c_holder_inner')[0].style.left; var new_percent = parseInt(left) - 100 + '%'; $('#c_holder_inner').css('left',new_percent); });
});
Nifty expandable carousel - Script Codes
Nifty expandable carousel - Script Codes
Home Page Home
Developer Adam T Pugh
Username tylerism
Uploaded July 13, 2022
Rating 3
Size 2,087 Kb
Views 36,432
Do you need developer help for Nifty expandable carousel?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Adam T Pugh (tylerism) Script Codes
Create amazing marketing copy with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!