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 Snippets
35
snippets by
Andrian
iPhone Touch Events in JavaScript
JavaScript
0
7
2634
Hide address bar
JavaScript
0
0
1801
Remove Inline Styles with JavaScript
JavaScript
0
6
2686
CodePad | Set Default Language to JavaScript
JavaScript
4
6
2514
Move Google Forms Responses to Specific Sheets
JavaScript
0
1
1245
npm: Custom task to run with package.json
JavaScript
0
1
1506
jQuery.formSerialize.js
jQuery
0
2
1255
Remove the inertia of the scroll
JavaScript
1
3
1673
Example React Button Component w/ onClick
JavaScript
0
1
7441
Ensure Your Window is the Backbone.js Root Object
JavaScript
0
2
1141
javascript get and set cookies
JavaScript
0
1
1850
Sticky div
JavaScript
1
6
1529
Copy to clipboard without flash
HTML
0
3
1483
React-ursive
JavaScript
0
3
1279
CreateJS Depth Set and Get
JavaScript
0
2
1780
Viewport dimensions | Javascript
JavaScript
0
5
1468
Sheetsu POST API usage
JavaScript
0
2
1470
a la place d'un else apres une for loop (freeCodeCamp Profile Lookup)
JavaScript
2
3
2540
Vanilla JavaScript $.getJSON version with callback
JavaScript
0
3
4075
Real time search result rendering
JavaScript
0
3
1423
Display desktop notifications | Javascript
JavaScript
8
50
10372
Long dropdown menu solutions.
JavaScript
0
2
2144
ES6 Classes - Node 5.0
JavaScript
0
6
1626
Generate random hexadecimal number
JavaScript
0
2
1576
Hide/show menu on scroll
JavaScript
0
6
1717
Get hash from URL
JavaScript
0
6
1196
Replace URL text to links
JavaScript
0
2
1032
NodeJS: TwitterAPI: Get bearer token (OAuth2)
JavaScript
0
6
2222
JS - Create Codepad.co Snippet Image Link
JavaScript
0
1
2191
Very simple js template engine
JavaScript
0
1
1375
add/removeClass, simple and fast, No JQuery
JavaScript
5
6
1970
Simple JS Template Function
JavaScript
0
2
1054
Simple Captcha/Random Code Generator
JavaScript
0
2
4457
Polyfill for object-fit: cover
JavaScript
0
2
1347
Make a tree object from an element
JavaScript
0
3
1780