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
2168
Strip HTML Tags in JavaScript
JavaScript
3
5
3006
Vanilla JavaScript RegEx (Trim ALL Whitespace)
JavaScript
0
4
2344
Redirect to SSL with JavaScript
JavaScript
0
3
2119
Remove Inline Styles with JavaScript
JavaScript
0
6
2774
CodePad | Set Default Language to JavaScript
JavaScript
4
6
2593
Remove the inertia of the scroll
JavaScript
1
3
1726
Google Maps Javascript
JavaScript
0
3
1824
JavaScript: Get all previous/next siblings
JavaScript
0
5
7174
React-ursive
JavaScript
0
3
1328
CreateJS Depth Set and Get
JavaScript
0
2
1838
Viewport dimensions | Javascript
JavaScript
0
5
1523
Javascript Titleize function
JavaScript
1
2
8897
Detect mobile device
JavaScript
0
2
1213
Modulus Function
JavaScript
1
3
1154
Get page current scroll
JavaScript
0
1
1221
Popup window
JavaScript
0
1
1302
Chart.js
JavaScript
0
3
1215
ES6 Classes - Node 5.0
JavaScript
0
6
1672
Generate random hexadecimal number
JavaScript
0
2
1667
JS: Render PIE chart using Datamatic API and Google spreadsheet
JavaScript
0
1
1174
jQuery Scroll to Element
JavaScript
0
1
1241
Hide/show menu on scroll
JavaScript
0
6
1755
JavaScript: Collapse on 'vanilla' javascript
JavaScript
0
2
3557
Audio Player
JavaScript
0
2
1372
Detecting the Operating System in JavaScript
JavaScript
0
7
2314
JavaScript: Prevent GooglePlus automatic sign-in and get user information
JavaScript
0
1
3063
Detecting Android Devices with Javascript
JavaScript
0
6
2257
JS: Get URL and URL Parts
JavaScript
0
3
1683
Javascript - Function Arguments to Array
JavaScript
0
2
1223
JavaScript / jQuery Load JSON from URL
jQuery
1
15
3217
Load JSON file locally using JavaScript
JavaScript
1
23
7262