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
2204
Strip HTML Tags in JavaScript
JavaScript
3
5
3047
Vanilla JavaScript RegEx (Trim ALL Whitespace)
JavaScript
0
4
2377
Redirect to SSL with JavaScript
JavaScript
0
3
2156
Remove Inline Styles with JavaScript
JavaScript
0
6
2819
CodePad | Set Default Language to JavaScript
JavaScript
4
6
2634
Remove the inertia of the scroll
JavaScript
1
3
1747
Google Maps Javascript
JavaScript
0
3
1854
JavaScript: Get all previous/next siblings
JavaScript
0
5
7257
React-ursive
JavaScript
0
3
1352
CreateJS Depth Set and Get
JavaScript
0
2
1865
Viewport dimensions | Javascript
JavaScript
0
5
1549
Javascript Titleize function
JavaScript
1
2
8938
Detect mobile device
JavaScript
0
2
1237
Modulus Function
JavaScript
1
3
1177
Get page current scroll
JavaScript
0
1
1241
Popup window
JavaScript
0
1
1326
Chart.js
JavaScript
0
3
1240
ES6 Classes - Node 5.0
JavaScript
0
6
1698
Generate random hexadecimal number
JavaScript
0
2
1712
JS: Render PIE chart using Datamatic API and Google spreadsheet
JavaScript
0
1
1201
jQuery Scroll to Element
JavaScript
0
1
1266
Hide/show menu on scroll
JavaScript
0
6
1780
JavaScript: Collapse on 'vanilla' javascript
JavaScript
0
2
3648
Audio Player
JavaScript
0
2
1395
Detecting the Operating System in JavaScript
JavaScript
0
7
2350
JavaScript: Prevent GooglePlus automatic sign-in and get user information
JavaScript
0
1
3102
Detecting Android Devices with Javascript
JavaScript
0
6
2290
JS: Get URL and URL Parts
JavaScript
0
3
1706
Javascript - Function Arguments to Array
JavaScript
0
2
1248
JavaScript / jQuery Load JSON from URL
jQuery
1
15
3259
Load JSON file locally using JavaScript
JavaScript
1
23
7379