Accordion Plugin written in Vanilla JavaScript.

Overview

Easy Accordion

Accordion plugin written purely in JavaScript.

Setup

So, to start using the Easy Accordion plugin in your project, you can include the script in your head/body section as shown below.

<script src="https://cdn.jsdelivr.net/gh/farhanhalai30/easy-accordion/js/easy-accordion.min.js">

Usage

Once you have included the script in your code, you can start using Easy Accordion as shown in the code below. For more list of options refer here

Options

Below is the list of options available.

Option Description Type Optional/Mandatory
target Selector name of the target element. String Mandatory
blockClass Class name for the block element String Mandatory
triggerClass Class name for the trigger element (the one which is clickable). String Mandatory
contentClass Class name for the content. String Mandatory
transitionDuration Amount of time to transite (in seconds). Number Optional
triggerActiveClass Class name for the trigger element in the active state (active means accordion is open). String Optional
contentActiveClass Class name for the trigger element in the active state. String Optional

Examples

  • Basic Example
    A basic demo of using Easy Accordion for the first time.
    Click here check out in action

  • Custom Active Classes
    Using custom active classes for trigger & content elements. Classes get added when the accordion is in active state.
    Click here check out in action

Browser Support

All browsers (Chrome, Mozilla, Safari) & in Internet Explorer upto IE9.

You might also like...

A very simple JavaScript library written in vanilla js for scrambling text.

A very simple JavaScript library written in vanilla js for scrambling text.

Scrambling Text A very simple JavaScript library written in vanilla js for scrambling text. Demo Page Table of Contents Installation Examples Basic Ex

Dec 7, 2022

A JavaScript plugin for creating a tickerboard effect. Plugin for React or vanilla JS.

ticker-board A JavaScript plugin for creating a tickerboard effect. See the Ticker Board page for more info. Importing it There are basically two ways

Aug 11, 2022

This is a vanilla Node.js rest API created to show that it is possible to create a rest API using only vanilla Node.js

This is a vanilla Node.js rest API created to show that it is possible to create a rest API using only vanilla Node.js. But in most cases, I would recommend you to use something like Express in a production project for productivity purposes.

Jul 19, 2022

A small, lightweight JavaScript plugin for placing items in straight rows (jQuery and vanilla JS version) – Demo:

A small, lightweight JavaScript plugin for placing items in straight rows (jQuery and vanilla JS version) – Demo:

rowGrid.js rowGrid.js is a small, lightweight (~1000 bytes gzipped) jQuery plugin for placing images (or other items) in straight rows. The grid is si

Jul 22, 2022

Vanilla JavaScript plugin for lazyloading images

Lazy Load Remastered Lazy Load delays loading of images in long web pages. Images outside of viewport will not be loaded before user scrolls to them.

Dec 31, 2022

Jspreadsheet is a lightweight vanilla javascript plugin to create amazing web-based interactive tables and spreadsheets compatible with other spreadsheet software.

Jspreadsheet is a lightweight vanilla javascript plugin to create amazing web-based interactive tables and spreadsheets compatible with other spreadsheet software.

Jspreadsheet CE v4: The JavaScript spreadsheet Jexcel CE has been renamed to Jspreadsheet CE News Important: Please import jspreadsheet.css (jexcel.cs

Dec 19, 2022

Superlight vanilla javascript plugin, for modern web dropdowns. Supporting multi-options, search and images. Designed to be seamlessly themed

Superlight vanilla javascript plugin, for modern web dropdowns. Supporting multi-options, search and images. Designed to be seamlessly themed

Superlight vanilla javascript dropdowns by LCweb Need to jump off of jQuery (or any other) dependency? Other packages are too heavy to just tweak sele

Dec 26, 2022

Vanilla Javascript plugin for manage kanban boards

jKanban Javascript plugin for Kanban boards jKanban allow you to create and manage Kanban Board in your project! Please try out the live demo! Install

Jan 3, 2023

Superlight vanilla javascript plugin improving forms look and functionality

Superlight vanilla javascript plugin improving forms look and functionality

Superlight pure javascript form switch plugin by LCweb Give a modern look to your applications and take advantage of javascript events and public func

Mar 9, 2022
Owner
Farhan Halai
Web Developer | JavaScript Enthusiast
Farhan Halai
Responsive tabs-to-accordion script without jQuery, written using pure JavaScript

vanilla-tabs Responsive tabs-to-accordion script without jQuery, written using pure JavaScript Author Dmytro Kudleichuk LinkedIn GitHub Online Demo Se

Dmitriy Kudleichuk 7 Dec 20, 2022
A dependency-free Vanilla JS Accordion Menu Nested

?? A dependency-free Vanilla JS Accordion Menu Nested No dependencies, no automation build tools. Copy/paste and ready to use. CSS and JS are inlined

Tomasz Bujnowicz 4 Dec 18, 2022
Easy responsive tabs - is a lightweight jQuery plugin which optimizes normal horizontal or vertical tabs to accordion on multi devices

Easy responsive tabs - is a lightweight jQuery plugin which optimizes normal horizontal or vertical tabs to accordion on multi devices like: web, tablets, Mobile (IPad & IPhone). This plugin adapts the screen size and changes its action accordingly.

Samson Onna 600 Dec 8, 2022
Just a jQuery accordion plugin

BeefUp Just a jQuery accordion plugin https://schascha.github.io/BeefUp/ Examples: Toggle buttons Hashchange CSS animations Self block Installation Yo

Sascha Künstler 44 Jul 6, 2022
jQuery plugin that combines the functionality of a grid with that of an accordion.

Grid Accordion - jQuery plugin A responsive and touch-enabled jQuery grid accordion plugin that combines the functionality of a grid with that of an a

null 1 Dec 16, 2022
Javascript accordion - tiny and simple.

Javascript Accordion Javascript accordion - tiny and simple. Accordions are useful when you want to toggle between hiding and showing large amount of

Kenan Gündoğan 4 Dec 8, 2022
Dynamic, fast, accessible & zero dependency accordion for React

React Fast Accordion ⚡️ Dynamic, fast, accessible & zero dependency accordion for React How it's fast? Instead of adding event listener on all the ite

Shivam 59 Oct 8, 2022
Simple, fast, accessible accordion library with no dependency

React Fast Accordion ⚡️ Dynamic, fast, accessible & zero dependency accordion for React How it's fast? Instead of adding event listener on all the ite

Shivam 59 Oct 8, 2022
A lightweight scrollbar library written in vanilla javascript.

A lightweight, dependency-free scrollbar library written in vanilla javascript. Fully customisable via CSS Native scrolling behaviour preserved Vertic

Karl 56 Dec 4, 2022