Skip to content

A small plugin that allows you to hide and display elements using a button

Notifications You must be signed in to change notification settings

adnanusman/custom-button-toggle-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

Button Toggle Plugin for WordPress

This WordPress plugin was created by me for use on websites at work, where the list of services were too long. However, it can be used to hide/display anything as long as it is wrapped within a div with an id starting with 'hidden' in its name.

Requirements

Create a button that says 'View Our List of Services', when it is clicked, a hidden list of services should appear. It should have a fade in and fade out effect.

How it works

Download the zip file from GitHub and install it to your WordPress website.

Create any number of buttons on a page, with the class: viewlist

Add a ul or div element below it with the id. The name of the id should begin with 'hidden' in it and every hidden item should have a unique id.

You can hide an element with the following CSS styles, here is how you would create a hiddenlist id:

#hiddenlist-1 { display: none; opacity: 0; transition: opacity 2s; }

Example of Plugin in use

Button

button

Button with List Opened

button

Created by Adnan Usman | View my GitHub Profile

About

A small plugin that allows you to hide and display elements using a button

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published