• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
JavaScriptSource

JavaScriptSource

Search 5,000+ Free JavaScript Snippets

  • Home
  • Browse Snippets
    • Addon
    • Ajax
    • Buttons
    • Cookies
    • CSS
    • Featured
    • Forms
    • Games
    • Generators
    • Image Effects
    • Math Related
    • Miscellaneous
    • Multimedia
    • Navigation
    • Page Details
    • Passwords
    • Text Effects
    • Time & Date
    • User Details

Check if an Object Is Empty

Check if an Object Is Empty

ere are some different methods that you could use to check if an object is empty in modern browsers that support the ES5 edition of JavaScript.

Miscellaneous

JavaScript Variables Explained

JavaScript Variables Explained

Variables are named values and can store any type of JavaScript value.

Basics

Strip HTML from a given text

Strip HTML from a given text

Here are 2 ways to strip HTML code from a given text.

Miscellaneous

Add, remove, toggle, and check for the presence of a class

Add, remove, toggle, and check for the presence of a class.

Here are some handy, simple ways to manipulate CSS classes.

CSS

Remove a Character From a String in JavaScript

Remove a Character From a String in JavaScript

How can you remove a character from a string in JavaScript? Here are a few different ways to do this.

Miscellaneous

Check if the given date is a weekend

Check if the given date is a weekend

Use Date.prototype.getDay() to check weekend by using a modulo operator (%).

Time & Date

JavaScript Operators Explained

JavaScript Operators Explained

Operators are the symbols between values that allow different operations like addition, subtraction, multiplication, and more.

Basics

Show or hide an element

Show or hide an element

Quick tip on how to show or hide an element with JavaScript

Miscellaneous

Find all matching elements on a page with document.querySelectorAll()

Find all matching elements on a page

Find all matching elements on a page. You can use any valid CSS selector.

CSS

Redirection: How to Change the URL in JavaScript

Redirection: How to Change the URL in JavaScript

We’ll go through the different built-in methods provided by JavaScript to implement URL redirection. In fact, JavaScript provides the location object, a part of the window object, which allows you to perform different URL-related operations.

Page Details

  • « Go to Previous Page
  • Go to page 1
  • Interim pages omitted …
  • Go to page 19
  • Go to page 20
  • Go to page 21
  • Go to page 22
  • Go to page 23
  • Interim pages omitted …
  • Go to page 36
  • Go to Next Page »

Primary Sidebar

Popular Posts

Story Generator

IP Grabber – get a users IP address with JavaScript

Simple Calendar

Remove Ads

Astrological Calculator

Copyright © 2025 JavaScriptSource.com

  • About
  • Privacy Policy
  • FAQ
  • Jobs For Developers