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: January 17, 2024
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]);

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About CodeHim

Free Web Design Code & Scripts - CodeHim is one of the BEST developer websites that provide web designers and developers with a simple way to preview and download a variety of free code & scripts. All codes published on CodeHim are open source, distributed under OSD-compliant license which grants all the rights to use, study, change and share the software in modified and unmodified form. Before publishing, we test and review each code snippet to avoid errors, but we cannot warrant the full correctness of all content. All trademarks, trade names, logos, and icons are the property of their respective owners... find out more...