A Vanilla JavaScript Content Carousel Slider Plugin | gaBasicSlider

gaBasicSlider is a vanilla JavaScript slider plugin that is designed to be customizable. If you want to design your own slider and you can create it in html and css, gaBasicSlider can animate it and give you API controls for your design.

Advantages:

  • 1.8 KB compressed
  • Touch support
  • parallax animation
  • Move the parts to fit your design
  • Infinite Repeated Navigation

How it works

gaBasicSlider takes parent-child coding and moves them with a slight difference effect. You can optionally pass the nodes to the next and previous buttons. gaBasicSlider also takes a node where it can either create pointers or use the current markup as pointers.

jQuery Slider/Carousel Plugin That Uses CSS3 Transitions | KOslider

How to make use of it:

1. Put in the jQuery JavaScript library and the jQuery gaBasicSlider plug-in.

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="ga-basic-slider-min.js"></script>

2. Add your content to the slider that follows the HTML structure.

<div id="example" class="slider">
  <div>
    <h2>Title 1</h2>
    <p>Description 1</p>
  </div>
  <div>
    <h2>Title 2</h2>
    <p>Description 2</p>
  </div>
  <div>
    <h2>Title 3</h2>
    <p>Description 3</p>
  </div>
</div>

3. Configure the plugin to create a carousel slider for the main content.

$(document).ready(function(){         
  $('#example').gaBasicSlider();
});

4. All settings are default.

// enable auto rotation
animate: true,

// animation delay time
animationDelay: 6000,

// animation duration time
animationTime: 300,

// CSS selector for custom indicator
indicators: null,

// CSS selector for custom next button
btnNext: null,

// CSS selector for custom previous button
btnPrevious: null

4. General ways to control the slider.

// turn animation off
$('#example').gaBasicSlider('stop'); 

// turn animation on
$('#example').gaBasicSlider('start');;

Parameters

This table shows each gaBasicSlider parameter as well as the variable type for each parameter and its default value if omitted.

ParameterTypeDefault
sliderNodenull
indicatorsNodenull
btnNextNodenull
btnPreviousNodenull
animateBooleantrue
animationDelayNumber (milliseconds)6000
animationDurationNumber (milliseconds)300

Basic Content Carousel Slider, gaBasicSlider Plugin/Github


See Demo And Download

Official Website(gregartist): Click Here

This superior jQuery/javascript plugin is developed by gregartist. For extra advanced usage, please go to the official website.

Related Posts

Cookie-Consent-Using-Bootstrap

How to Create a Simple Cookie Banner Consent Using Bootstrap 4

Cookie Consent Popup Javascript – Quick and simple tutorial for creating a simple Bootstrap cookie banner. If you have a website or blog with people visiting or…

Create-HTML-Terminals

Create Custom HTML Terminals With Pure JavaScript | shell.js

Custom HTML Terminals is A JavaScript library to create HTML terminals on web pages. The shell js JavaScript library offers a straightforward method to create Ubuntu, OS X,…

Bootstrap-Alert-Bootbox

Bootstrap Alert, Confirm, and Flexible Dialog Boxes | Bootbox

Bootbox.js is a small JavaScript library that allows you to create programming dialogs using Bootstrap templates, without having to worry about creating, managing, or removing any required…

Slider-fg-carousel

An Accessible Touch-enabled Slider Web Component | fg-carousel

fg-carousel Slider – A simple & modern slider web component to create versatile, accessible, touch-enabled picture carousels utilizing CSS scroll snap, Custom Element, and Intersection Observer API….

Tags-Input-Component

A Lightweight and Efficient Tags Input Component in Vanilla JS | tagify

tagify transforms an input field or textarea into a tags component, in an easy and customizable way, with great performance and a small code footprint, full of…

copy-to-clipboard-javascript

A Lightweight Library to Copy Text to Clipboard | CopyJS

CopyJS is a lightweight JavaScript library that allows you to copy plain text or HTML content to the clipboard. Must Read: Tiny Library for Copy Text In…