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 Aurelien Dotpro
How to test a regex
JavaScript
0
0
694
ES6 Filter usage
JavaScript
0
0
641
Regex get url Locale
JavaScript
0
0
947
Insert Autoplay Video
JavaScript
0
0
672
Create an element and add it to the DOM
JavaScript
0
0
915
Wait for Element to exist via Mutation Observer
JavaScript
0
0
746
Swap two elements (with jQuery)
JavaScript
0
1
1111
Debounce on scroll
JavaScript
0
1
670
Set Cookie in JS with expire date
JavaScript
0
0
654
Convert date to Time Stamp
JavaScript
0
0
713
Wait for an element to exist (via Mutation Observer)
JavaScript
0
0
2742
Detect Element content change (via Mutation Observer)
JavaScript
0
0
943
insertAdjacentHTML
JavaScript
0
0
699
Intersection Observer Example
JavaScript
0
0
678
forEach querySelectorAll
JavaScript
0
1
449