Tips & Tutorials

5 Ways to Allow Only One Click in Javascript (Simple Examples)

Welcome to a beginner’s tutorial on how to allow only one click in Javascript. So you have a button or element that says “click here to do something”, but want to prevent the user from clicking it multiple times. There are a number of ways to allow only one-click in Javascript: Disable the button after …

5 Ways to Allow Only One Click in Javascript (Simple Examples) Read More »

4 Ways To Duplicate HTML Elements In Javascript (Simple Examples)

Welcome to a tutorial on how to duplicate HTML elements. So you are working on a project that requires the creation of evil clones, probably to ease tasks like creating table rows and list items? An easy way to duplicate an HTML element in Javascript is to use the cloneNode() function: var original = document.getElementById(“ID”); …

4 Ways To Duplicate HTML Elements In Javascript (Simple Examples) Read More »

How To Make Unselectable Text In HTML (Simple Examples)

Welcome to a quick tutorial on how to make unselectable text in HTML. So you have a not-so-top-secret website that you want to protect? Stop people from highlighting and copying the text? There are 2 common ways to create unselectable text: In CSS, simply add the user-select: none property. In Javascript, document.getElementById(“TARGET”).onselectstart = function () …

How To Make Unselectable Text In HTML (Simple Examples) Read More »

3 Steps To Filter/Search a List in Javascript (Simple Examples)

Welcome to a beginner’s tutorial on how to filter or search a list in Javascript. So you have a long list of products, users, inventory… or just about any item for the matter. How do we improve the interface and add a search filter to that massive list? Yep, that is doing a search using …

3 Steps To Filter/Search a List in Javascript (Simple Examples) Read More »

Simple Shopping List In Vanilla Javascript (Free Source Code)

Welcome to a tutorial on how to create a simple shopping list in vanilla Javascript. Nope, I totally did not get the idea for this tutorial from a certain Javascript challenge. It’s original content. 😆 Anyway, a shopping list is totally possible these days with modern Javascript, using the local storage API – That is …

Simple Shopping List In Vanilla Javascript (Free Source Code) Read More »

Simple Drag-and-Drop File Upload With JS and HTML5

Welcome to a quick tutorial on how to create a simple drag-and-drop file upload with Javascript and HTML. Forget those old boring “select a file” uploads. The Stone Age of the Internet is long over and it is time to create more exciting uploads. A drag-and-drop upload is actually not really that difficult to implement, …

Simple Drag-and-Drop File Upload With JS and HTML5 Read More »

Simple Autocomplete With Pure HTML Javascript (Free Download!)

Welcome to a tutorial on how to create an autocomplete with pure HTML, CSS, and Javascript. Yes, there are many autocomplete plugins these days, but some of them introduce a lot of loading bloat with the use of third-party frameworks. So here it is, a sharing of my version of autocomplete, all done using pure …

Simple Autocomplete With Pure HTML Javascript (Free Download!) Read More »