Playgrounds
Snippets
Developers
Compiler
All
ActionScript
Ajax
AngularJS
Apache
AppleScript
ASP.NET
Bash
C
C#
C++
Coffee
CoffeeScript
ColdFusion
Command
CSS
Delphi
Django
ES6
GLSL
Grunt
Gulp
HAML
Haskell
HTML
iOS
Jade
Java
JavaScript
jQuery
JSX
Less
LUA
MDX
MySQL
Objective
Other
Pascal
Perl
PHP
Plain text
PowerShell
Processing
Progress
Prolog
Pseudocode
Python
Rails
RegExr
Ruby
SASS
Scala
Scheme
SCSS
SmallBASIC
Smarty
SQL
Stylus
SVG
Swift
TypeScript
VHDL
X++
XHTML
XML
Xojo
XSLT
New snippet
New playground
Sign up
Login
Upload
Playgrounds
Snippets
Developers
Sign up
Login
Codepad is a place for developers to share code snippets (PHP, Java, Bash, C, C++, Python and more). Create your HTML, CSS and JS Demos.
Sign up
Learn more
JavaScript Collection
32
snippets by
Avan C.
Test for Internet Explorer in JavaScript
JavaScript
0
5
1964
Strip HTML Tags in JavaScript
JavaScript
3
5
2757
Vanilla JavaScript RegEx (Trim ALL Whitespace)
JavaScript
0
4
2140
Redirect to SSL with JavaScript
JavaScript
0
3
1928
Remove Inline Styles with JavaScript
JavaScript
0
6
2501
CodePad | Set Default Language to JavaScript
JavaScript
4
6
2361
Remove the inertia of the scroll
JavaScript
1
3
1603
Google Maps Javascript
JavaScript
0
3
1720
JavaScript: Get all previous/next siblings
JavaScript
0
5
6818
React-ursive
JavaScript
0
3
1202
CreateJS Depth Set and Get
JavaScript
0
2
1705
Viewport dimensions | Javascript
JavaScript
0
5
1373
Javascript Titleize function
JavaScript
1
2
8665
Detect mobile device
JavaScript
0
2
1096
Modulus Function
JavaScript
1
3
1047
Get page current scroll
JavaScript
0
1
1099
Popup window
JavaScript
0
1
1184
Chart.js
JavaScript
0
3
1120
ES6 Classes - Node 5.0
JavaScript
0
6
1546
Generate random hexadecimal number
JavaScript
0
2
1484
JS: Render PIE chart using Datamatic API and Google spreadsheet
JavaScript
0
1
1076
jQuery Scroll to Element
JavaScript
0
1
1139
Hide/show menu on scroll
JavaScript
0
6
1630
JavaScript: Collapse on 'vanilla' javascript
JavaScript
0
2
3244
Audio Player
JavaScript
0
2
1263
Detecting the Operating System in JavaScript
JavaScript
0
7
2079
JavaScript: Prevent GooglePlus automatic sign-in and get user information
JavaScript
0
1
2902
Detecting Android Devices with Javascript
JavaScript
0
6
2035
JS: Get URL and URL Parts
JavaScript
0
3
1565
Javascript - Function Arguments to Array
JavaScript
0
2
1104
JavaScript / jQuery Load JSON from URL
jQuery
1
15
2968
Load JSON file locally using JavaScript
JavaScript
1
23
6473