jQuery div Vertical Content Slider – carousel-vertical.js

The “Carousel Vertical” is a touch enabled, cross-platform and cross-browser div based content slider plugin for jQuery. This plugin allows you to create responsive vertical carousel for all kind of web projects. The plugin comes with built-in swipe and touch support to navigate slider items.

In addition, it is useful to slide any HTML content (i.e image, video, text, iframe etc). You just need to place your item in carousel HTML structure.

Plugin Overview

Plugin: carousel-vertical
Author: Simon Iannacone
Licence: MIT Licence
Published: September 18, 2019
Repository: Fork on GitHub
Dependencies: jQuery 1.3.1 or Latest version
File Type: zip archive (HTML, CSS & JavaScript )
Package Size: 4.49 KB

How to Make div Vertical Content Slider

1. After downloading this project, include the carousel-vertical plugin’s CSS and JavaScript file (just after the jQuery) into your HTML document.

<!-- jQuery -->
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>

<!-- Carousel Vertical CSS -->
<link rel="stylesheet" href="css/carousel-vertical.css">

<!-- Carousel Vertical JS -->
<script src="js/carousel-vertical.js"></script>

2. Now, create a basic HTML structure for vertical carousel as follows:

<div class="cv-carousel">
   <div class="item">
     Your first div content goes here.
   </div>
   <div class="item">
      This is second block.
   </div>
   <div class="item">
      This is third div block.
   </div>
   .
   .
   .
   <div class="item">
   Content of N div.
   </div>
</div>

Tip: Place your content between <div class="item">. You can put anything like images or text etc.

3. Initialize the plugin in jQuery document ready function to active the div vertical content slider.

$(document).ready(function(){

   $('.cv-carousel').carouselVertical();
					
});

4. To move the slider’s item programmatically use the following syntax.

$('.cv-carousel').trigger('goTo', [5]); 
//or
$('.cv-carousel').carouselVertical().trigger('goTo', [5]);