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 333 posted 8 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 313 posted 8 years ago by jbernus
Assuming that by empty means "has no properties of its own"
0 325 posted 8 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 383 posted 8 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 277 posted 8 years ago by redhatmatt
IE doesn't like console.log. This fixes that.
1 310 posted 8 years ago by bitsculptor
Used to stretch a video / image to fill a background without skewing. Attach to resize events
0 360 posted 8 years ago by rickygri
This is a simple fix for the iOS zoom bug that happens when changing screen orientations.
0 327 posted 8 years ago by bitsculptor
Use Javascript to check if JQuery is loaded properly in the browser
1 343 posted 8 years ago by nshakin
Changes shape back and forth from a round element to a square element.
0 281 posted 8 years ago by COBOLdinosaur
The following code fetches contents of each Title field from the list called "LandingMiddleLinks"
0 550 posted 8 years ago by rumremix
The loading of JS social buttons its deferred until onload event its fired.
0 297 posted 8 years ago by jefrancomix
0 258 posted 8 years ago by phl
# layout para un panel con scrollbars
0 304 posted 8 years ago by lecksfrawen
will preload any background image referenced in your CSS.
0 311 posted 8 years ago by sarpay
Use a regex to check the email address input
4 532 posted 8 years ago by dreamstarter
simple code of using Ajax by JavaScript or jQuery
0 395 posted 8 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 301 posted 8 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 328 posted 8 years ago by Salamandern
easy way to use placeholders before html5
0 264 posted 8 years ago by bitsculptor
Find an object in a collection with underscore. Using the filter function from underscore.
0 265 posted 8 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 302 posted 8 years ago by leodruker
Generic function - Pass the context to the function for use with any field
0 315 posted 8 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 355 posted 8 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 339 posted 8 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 397 posted 8 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 551 posted 8 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 262 posted 8 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 1648 posted 8 years ago by apphp-snippets
1 2 3 4 5 6 ... 67