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
1302
Strip HTML Tags in JavaScript
JavaScript
3
5
2042
Vanilla JavaScript RegEx (Trim ALL Whitespace)
JavaScript
0
4
1444
Redirect to SSL with JavaScript
JavaScript
0
3
1281
Remove Inline Styles with JavaScript
JavaScript
0
6
1786
CodePad | Set Default Language to JavaScript
JavaScript
4
6
1756
Remove the inertia of the scroll
JavaScript
1
3
1195
Google Maps Javascript
JavaScript
0
3
1241
JavaScript: Get all previous/next siblings
JavaScript
0
5
5196
React-ursive
JavaScript
0
3
755
CreateJS Depth Set and Get
JavaScript
0
2
1185
Viewport dimensions | Javascript
JavaScript
0
5
905
Javascript Titleize function
JavaScript
1
2
7139
Detect mobile device
JavaScript
0
2
682
Modulus Function
JavaScript
1
3
626
Get page current scroll
JavaScript
0
1
706
Popup window
JavaScript
0
1
746
Chart.js
JavaScript
0
3
698
ES6 Classes - Node 5.0
JavaScript
0
6
1100
Generate random hexadecimal number
JavaScript
0
2
950
JS: Render PIE chart using Datamatic API and Google spreadsheet
JavaScript
0
1
676
jQuery Scroll to Element
JavaScript
0
1
723
Hide/show menu on scroll
JavaScript
0
6
1150
JavaScript: Collapse on 'vanilla' javascript
JavaScript
0
2
2099
Audio Player
JavaScript
0
2
805
Detecting the Operating System in JavaScript
JavaScript
0
7
1390
JavaScript: Prevent GooglePlus automatic sign-in and get user information
JavaScript
0
1
2233
Detecting Android Devices with Javascript
JavaScript
0
6
1355
JS: Get URL and URL Parts
JavaScript
0
3
1132
Javascript - Function Arguments to Array
JavaScript
0
2
675
JavaScript / jQuery Load JSON from URL
jQuery
1
15
2218
Load JSON file locally using JavaScript
JavaScript
0
23
3919