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
1846
Strip HTML Tags in JavaScript
JavaScript
3
5
2624
Vanilla JavaScript RegEx (Trim ALL Whitespace)
JavaScript
0
4
2007
Redirect to SSL with JavaScript
JavaScript
0
3
1822
Remove Inline Styles with JavaScript
JavaScript
0
6
2380
CodePad | Set Default Language to JavaScript
JavaScript
4
6
2269
Remove the inertia of the scroll
JavaScript
1
3
1544
Google Maps Javascript
JavaScript
0
3
1664
JavaScript: Get all previous/next siblings
JavaScript
0
5
6643
React-ursive
JavaScript
0
3
1143
CreateJS Depth Set and Get
JavaScript
0
2
1638
Viewport dimensions | Javascript
JavaScript
0
5
1311
Javascript Titleize function
JavaScript
1
2
8521
Detect mobile device
JavaScript
0
2
1039
Modulus Function
JavaScript
1
3
986
Get page current scroll
JavaScript
0
1
1043
Popup window
JavaScript
0
1
1119
Chart.js
JavaScript
0
3
1064
ES6 Classes - Node 5.0
JavaScript
0
6
1477
Generate random hexadecimal number
JavaScript
0
2
1403
JS: Render PIE chart using Datamatic API and Google spreadsheet
JavaScript
0
1
1019
jQuery Scroll to Element
JavaScript
0
1
1085
Hide/show menu on scroll
JavaScript
0
6
1572
JavaScript: Collapse on 'vanilla' javascript
JavaScript
0
2
3087
Audio Player
JavaScript
0
2
1199
Detecting the Operating System in JavaScript
JavaScript
0
7
1962
JavaScript: Prevent GooglePlus automatic sign-in and get user information
JavaScript
0
1
2812
Detecting Android Devices with Javascript
JavaScript
0
6
1915
JS: Get URL and URL Parts
JavaScript
0
3
1495
Javascript - Function Arguments to Array
JavaScript
0
2
1040
JavaScript / jQuery Load JSON from URL
jQuery
1
15
2834
Load JSON file locally using JavaScript
JavaScript
1
23
6054