Slick carousel with detached captions - Figure Variant

Developer
Size
3,339 Kb
Views
12,144

How do I make an slick carousel with detached captions - figure variant?

What is a slick carousel with detached captions - figure variant? How do you make a slick carousel with detached captions - figure variant? This script and codes were developed by Kenan Yusuf on 06 December 2022, Tuesday.

Slick carousel with detached captions - Figure Variant Previews

Slick carousel with detached captions - Figure Variant - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Slick carousel with detached captions - Figure Variant</title> <link href='https://fonts.googleapis.com/css?family=Alegreya+Sans:300,400|Source+Sans+Pro:400,300' rel='stylesheet' type='text/css'>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='http://cdn.jsdelivr.net/jquery.slick/1.5.9/slick.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="slider"> <div class="figures"> <figure> <div class="slide">Figure 1</div> <figcaption>This is a caption for figure 1</figcaption> </figure> <figure> <div class="slide">Figure 2</div> <figcaption>This is a caption for figure 2</figcaption> </figure> <figure> <div class="slide">Figure 3</div> <figcaption>This is a caption for figure 3</figcaption> </figure> </div> <div class="controls"> <div class="captions"></div> <div class="pagination"></div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://cdn.jsdelivr.net/jquery.slick/1.5.9/slick.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Slick carousel with detached captions - Figure Variant - Script Codes CSS Codes

* { box-sizing: border-box;
}
html,
body { height: 100%;
}
body { width: 100%; height: 100%; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; background: #e6e6e6; font-family: 'Source Sans Pro', sans-serif; padding: 10px;
}
figure { margin: 0;
}
figcaption { display: none;
}
.slider { width: 100%; max-width: 700px;
}
.slides { background: #ccc;
}
.slide { display: flex !important; justify-content: center; align-items: center; background: #fff; height: 350px; outline: 0 !important; color: #ccc; font-size: 40px;
}
.controls { display: flex; width: 100%;
}
.captions { flex: 1; width: 100px; padding: 10px; margin-top: 2px; color: #7b7b7b; background: #fff;
}
.caption { outline: 0 !important;
}
.pagination { display: flex; margin-top: 2px;
}
.pagination__button { cursor: pointer; display: flex; justify-content: center; align-items: center; color: #ccc; background: #fff; width: 40px; height: 40px; margin-left: 2px;
}
.pagination__button:hover { color: #fff; background: #2aa1c0;
}
.pagination__button.slick-disabled { cursor: not-allowed; background: #ccc; color: #fff;
}

Slick carousel with detached captions - Figure Variant - Script Codes JS Codes

var $figures = $('.figures') , $figcaption = $('figcaption') , $captions = $('.captions')
$figcaption.each(function() { var $caption = $(this).html() $captions.append('<div class="caption">' + $caption + '</div>')
})
$figures.slick({ asNavFor: '.captions', infinite: false, speed: 200, arrows: false
})
$captions.slick({ asNavFor: '.figures', infinite: false, speed: 200, fade: true, appendArrows: $('.pagination'), prevArrow: '<div class="pagination__button"><i class="material-icons">keyboard_arrow_left</i></div>', nextArrow: '<div class="pagination__button"><i class="material-icons">keyboard_arrow_right</i></div>'
})
Slick carousel with detached captions - Figure Variant - Script Codes
Slick carousel with detached captions - Figure Variant - Script Codes
Home Page Home
Developer Kenan Yusuf
Username KenanYusuf
Uploaded December 06, 2022
Rating 3
Size 3,339 Kb
Views 12,144
Do you need developer help for Slick carousel with detached captions - Figure Variant?

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!

Kenan Yusuf (KenanYusuf) 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!