How to Create simple Accordion using JavaScript

Accordion is an expandable and collapsible container which used to manage related data. It consumes less space and shows content in a user-friendly format.

There are already lots of jQuery plugins for implementing this, like – jQuery UI, Bootstrap, accordion.js, etc.

In this tutorial, I show how you can create accordion using JavaScript.

How to Create simple accordion using JavaScript

Read more

How to Autocomplete textbox using JavaScript and PHP

Javascript Autocomplete textbox helps the user to pick an item from the suggestion list based on the input. It occupies less space on the page. It’s designed to give you a smooth experience while using minimal space on your webpage, making your interface look neat and organized.

Data is not preloaded on the page. Instead, it dynamically loads data using AJAX as soon as the user starts typing.

In this tutorial, I show how you can create autocomplete textbox with MySQL database data using JavaScript and PHP.

How to Autocomplete textbox using JavaScript and PHP

Read more

How to Check if element has class in JavaScript

CSS classes are very helpful when need to add same style on multiple HTML elements. However, classes are not limited to styling alone; they also enable us to perform various actions based on the presence or absence on an element.

In this tutorial, I show how you can check specific class on single or multiple elements using JavaScript with examples.

How to Check if element has class in JavaScript

Read more