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 by Alessandro Annini
Check if cookies are enabled
JavaScript
0
0
951
Toggle all checkboxes
JavaScript
0
0
1003
Get the index of an element
JavaScript
0
0
922
Validate date of birth
JavaScript
0
0
1005
Test if an element is visible
JavaScript
0
0
936
Counting child elements
JavaScript
0
0
950
Center an element on the screen
JavaScript
0
1
994
Moving options from list A to list B
JavaScript
0
0
921
Select all checkboxes
JavaScript
0
0
955
Get the current URL
JavaScript
0
0
1019
Check if and which key was pressed
JavaScript
0
0
1137
How to refresh the src of an image with jQuery?
JavaScript
0
0
953
How to see if an image is loaded or not with jquery
JavaScript
0
0
918
And if a set (example : 10 images) of images are loaded
JavaScript
0
0
928
How to remove selected text after mouse double click event
JavaScript
0
0
1074
Validate email address
JavaScript
0
0
964
How to order a <ul> element using jQuery
JavaScript
0
0
995
Passing parameters to a function called with setTimeout
JavaScript
0
0
981
Disable right mouse click
JavaScript
0
0
990
Fade out an image, and fade in another one (replacing the previous one)
JavaScript
0
0
1003