Javascripts

A collection of interesting and awesome scripts I've encountered over the years - hope to be an ever growing project.

Feel free to contribute!

Typewriter - link

A script that writes letters to a page, and then erases them, moving on to the next word before repeating. Can be customized with any words you want, and the wait time between words.

How to use it:

Add the ID of 'typewriter' to your element, customize using data-wait in milliseconds (1 second = 1000), and add your words to the data-words attribute.

Example:

Javascript is

Darkmode - link

A script that checks the user's preferred mode (dark vs light) and then sets your CSS accordingly.

How to use it:

Add the ID of 'dark-mode-toggle' to your button and an onclick="toggleDarkMode()", make sure your css is setup with lightmode and darkmode classes

Example:

Tilt - link

A smooth 3D tilt javascript library forked from Tilt.js (jQuery version)

How to use it:

Add data-tilt to your element, and include the tilt script right before the body close tag.

Example:

https://placeholder.com/ generated image

Background Transitions - link

A script that allows users to generate random background color transitions to their webpage. The transition speed at which the colors change can be changed

How to use it:

Simply link the script in your HTML document, and you will have the background transition effect added to your webpage.