Welcome To Snipplr


Everyone's Recent JavaScript Snippets



1 2 3 4 5 6 ... 67
This handy tool takes raw CSS and finds all relative URLs for background images and injects the absolute path. After which all the background images are displayed on the page. This is useful if you need a quick way to save all background images at on...
0 170 posted 7 years ago by pussard
For side by side ULs that become too wide on small screens/devices. The following script let you merge or unmerge ULs depending on the size of the screen/device. Works with jQuery
0 152 posted 7 years ago by jbernus
Assuming that by empty means "has no properties of its own"
0 145 posted 7 years ago by satie83
This is a really basic skeleton template for jQuery plugins. It provides a callback function which can be called anywhere in your plugin with base.success(); This will return the current element, but you can pass anything you like back by changing th...
0 176 posted 7 years ago by rickygri
It currently uses redis as a store for the data. The url's are pretty long since it's all base64 encoded data and the images are returned as base64 encoded PNG's but that can be solved pretty easily. This could be used a service for something kind of...
0 122 posted 7 years ago by redhatmatt
IE doesn't like console.log. This fixes that.
1 138 posted 7 years ago by bitsculptor
Used to stretch a video / image to fill a background without skewing. Attach to resize events
0 174 posted 7 years ago by rickygri
This is a simple fix for the iOS zoom bug that happens when changing screen orientations.
0 145 posted 7 years ago by bitsculptor
Use Javascript to check if JQuery is loaded properly in the browser
1 150 posted 7 years ago by nshakin
Changes shape back and forth from a round element to a square element.
0 120 posted 7 years ago by COBOLdinosaur
The following code fetches contents of each Title field from the list called "LandingMiddleLinks"
0 242 posted 7 years ago by rumremix
The loading of JS social buttons its deferred until onload event its fired.
0 134 posted 7 years ago by jefrancomix
0 99 posted 7 years ago by phl
# layout para un panel con scrollbars
0 151 posted 7 years ago by lecksfrawen
will preload any background image referenced in your CSS.
0 134 posted 7 years ago by sarpay
Use a regex to check the email address input
4 306 posted 7 years ago by dreamstarter
simple code of using Ajax by JavaScript or jQuery
0 187 posted 7 years ago by codingforever99
The use of dynamic data acquisition on modern web sites and in a lot of intranet applications, sometimes means we have to build structures dynamically as data comes in from a feed or AJAX operations. The problem is not with the data, but rather that...
0 145 posted 7 years ago by COBOLdinosaur
This function will return the sum of the characters making up a number. For example, summate(321) will return 6. summate(123) will also return 6, because both 123 and 321 are made out of the same characters. Supports integers of any length, but only...
0 145 posted 7 years ago by Salamandern
easy way to use placeholders before html5
0 113 posted 7 years ago by bitsculptor
Find an object in a collection with underscore. Using the filter function from underscore.
0 117 posted 7 years ago by alexedy
JavaScript code to facilitate dynamic re-sizing of an iframe at the same time as the browser window is re-sized, as well as making sure that the frame scales proportionally to its width and height.
1 112 posted 7 years ago by leodruker
Generic function - Pass the context to the function for use with any field
0 128 posted 7 years ago by chetkloss
This simple scripts show a possibility to call a JavaScript function that retrieves a variable passed from drop down box as a parameter and then the JavaScript redirects the browser to the variable that was passed to it.
0 150 posted 7 years ago by apphp-snippets
This script informs your visitor that a given page may be reached only from the page that you specify. Paste this code before the ending <head> tag on the page:
1 162 posted 7 years ago by apphp-snippets
One of the important things about user input is to verify that the user has supplied the email that you have requested. The function below allows you to verify email address with easy.
1 185 posted 7 years ago by apphp-snippets
You may perform this work with two ways: pass it directly like described in sample #1 or use an anonymous function like its shown in sample #2.
0 284 posted 7 years ago by apphp-snippets
This function allows you to pass two variables that represent ID of two elements on your page. What you click on one of them it hide it and shows another one.
1 122 posted 7 years ago by apphp-snippets
Most today's web browsers like Firefox (Ctrl+D), Opera (Ctrl+T) and IE (Ctrl+D) provide a keyboard shortcuts to enable users bookmark their favorite pages. But if you want to provide your visitors with a "Bookmark this page" link they can click you m...
1 1111 posted 7 years ago by apphp-snippets
1 2 3 4 5 6 ... 67