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
2713
Smooth Scroll
jQuery
1
15
6059
throttle-js
JavaScript
0
1
1377
Scroll top position
JavaScript
0
1
984
JS Module pattern with jquery
JavaScript
0
4
1433
Loop through a JavaScript object (very base)
SASS
0
2
1336
Increment letters in JavaScript
SASS
0
1
1520
Count up numbers in JavaScript
jQuery
0
1
3512
JS module pattern without jQuery
Bash
0
2
1254
Smoke Effects in CSS and JavaScript
1
17
47778
Countdown til' date
JavaScript
0
4
1380
Sortable List with Drag and Drop
2
50
27720
Blobs effect
0
26
3415
Remove duplicates of multidimensional arrays
JavaScript
0
9
1239
Return scroll position in Vanilla js
JavaScript
0
4
2025
Simple method to format date in Javascript (in order to get the th, rd, st, ...)
JavaScript
0
1
1518
Simple function to return scrollTop position in %
JavaScript
0
2
1184
VanillaJS ScrollTo
JavaScript
0
2
1325