Welcome To Snipplr


Everyone's Recent JavaScript Snippets



1 2 3 4 5 6 ... 65
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 715 posted 10 years ago by jbernus
Assuming that by empty means "has no properties of its own"
0 717 posted 10 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 819 posted 10 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 649 posted 10 years ago by redhatmatt
IE doesn't like console.log. This fixes that.
1 702 posted 10 years ago by bitsculptor
Used to stretch a video / image to fill a background without skewing. Attach to resize events
0 792 posted 10 years ago by rickygri
This is a simple fix for the iOS zoom bug that happens when changing screen orientations.
0 726 posted 10 years ago by bitsculptor
Use Javascript to check if JQuery is loaded properly in the browser
1 727 posted 10 years ago by nshakin
Changes shape back and forth from a round element to a square element.
0 606 posted 10 years ago by COBOLdinosaur
The following code fetches contents of each Title field from the list called "LandingMiddleLinks"
0 1207 posted 10 years ago by rumremix
The loading of JS social buttons its deferred until onload event its fired.
0 631 posted 11 years ago by jefrancomix
0 579 posted 11 years ago by phl
# layout para un panel con scrollbars
0 639 posted 11 years ago by lecksfrawen
will preload any background image referenced in your CSS.
0 680 posted 11 years ago by sarpay
Use a regex to check the email address input
4 1064 posted 11 years ago by dreamstarter
simple code of using Ajax by JavaScript or jQuery
0 894 posted 11 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 668 posted 11 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 768 posted 11 years ago by Salamandern
easy way to use placeholders before html5
0 606 posted 11 years ago by bitsculptor
Find an object in a collection with underscore. Using the filter function from underscore.
0 552 posted 11 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 758 posted 11 years ago by leodruker
Generic function - Pass the context to the function for use with any field
0 675 posted 11 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 744 posted 11 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 685 posted 11 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 881 posted 11 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 964 posted 11 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 579 posted 11 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 4811 posted 11 years ago by apphp-snippets
You can use JavaScript window.location to redirect a visitor to a required page. You may have seen this feature used by sites with full page ads, or to redirect visitors to the site's new domain name. You can add also a timer to the script that will...
2 1024 posted 11 years ago by apphp-snippets
1 2 3 4 5 6 ... 65