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
JS Snippets
Some JS snippets
18
snippets by
Dan Dvoracek
iPhone Touch Events in JavaScript
JavaScript
0
7
2611
Smooth Scroll
jQuery
1
15
5997
throttle-js
JavaScript
0
1
1317
Scroll top position
JavaScript
0
1
937
JS Module pattern with jquery
JavaScript
0
4
1381
Loop through a JavaScript object (very base)
SASS
0
2
1276
Increment letters in JavaScript
SASS
0
1
1437
Count up numbers in JavaScript
jQuery
0
1
3437
JS module pattern without jQuery
Bash
0
2
1197
Smoke Effects in CSS and JavaScript
1
16
46981
Countdown til' date
JavaScript
0
4
1325
Sortable List with Drag and Drop
2
50
27233
Blobs effect
0
26
3353
Remove duplicates of multidimensional arrays
JavaScript
0
9
1180
Return scroll position in Vanilla js
JavaScript
0
4
1967
Simple method to format date in Javascript (in order to get the th, rd, st, ...)
JavaScript
0
1
1457
Simple function to return scrollTop position in %
JavaScript
0
2
1119
VanillaJS ScrollTo
JavaScript
0
2
1250