• 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

Get all URL parameters from a query string

Get all URL parameters from a query string

A technique you can use to get all query string parameters and push them into an object of key/value pairs.

Page Details

Check if touch events are supported

Check if touch events are supported

Check if ‘ontouchstart’ exists in window.

Navigation

Remove a Class from an Element

Remove a Class from an Element

To remove a class from an element, you use the remove() method of the classList property of the element.

CSS

Create a one time event handler

Create a one time event handler

When attaching a handler to a given event, you can pass { once: true } to the last parameter of the addEventListener method.

Miscellaneous

Get the value of a query string from a URL

Get the value of a query string from a URL

Here’s a simple method you can use to get the value of a query string with native JavaScript.

Miscellaneous

Check if the given argument is a string

Check if the given argument is a string

Use typeof to check if a value is classified as a string primitive.

Miscellaneous

Add a Class to an Element

Add a Class to an Element

To add a class to an element, you use the classList property of the element.

CSS

Detect Internet Explorer browser

Detect Internet Explorer browser

Check if the current browser is Internet Explorer (IE).

Miscellaneous

Get all of an element’s parent elements up the DOM tree

Get all of an element’s parent elements up the DOM tree

Let’s look at how to get all parent elements of a specific element.

CSS

Check if the given number falls within the given range

Check if the given number falls within the given range

Use arithmetic comparison to check if the given number is in the specified range.

Miscellaneous

  • « Go to Previous Page
  • Go to page 1
  • Interim pages omitted …
  • Go to page 24
  • Go to page 25
  • Go to page 26
  • Go to page 27
  • Go to page 28
  • 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