Welcome To Snipplr
Everyone's Recent JavaScript Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
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 
        
        
            1420 
        
                    posted 12 years ago by jbernus
            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 
        
        
            1423 
        
                    posted 12 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 
        
        
            1355 
        
                    posted 12 years ago by redhatmatt
            Used to stretch a video / image to fill a background without skewing.  Attach to resize events
        
        
        
            0 
        
        
            2379 
        
                    posted 12 years ago by rickygri
            This is a simple fix for the iOS zoom bug that happens when changing screen orientations.
        
        
        
            0 
        
        
            1396 
        
                    posted 12 years ago by bitsculptor
            Use Javascript to check if JQuery is loaded properly in the browser
        
        
        
            1 
        
        
            1320 
        
                    posted 12 years ago by nshakin
            Changes shape back and forth from a round element to a square element.
        
        
        
            0 
        
        
            1200 
        
                    posted 12 years ago by COBOLdinosaur
            The following code fetches contents of each Title field from the list called "LandingMiddleLinks"
        
        
        
            0 
        
        
            2517 
        
                    posted 12 years ago by rumremix
            The loading of JS social buttons its deferred until onload event its fired.
        
        
        
            0 
        
        
            1391 
        
                    posted 12 years ago by jefrancomix
            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 
        
        
            1300 
        
                    posted 12 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 
        
        
            1720 
        
                    posted 12 years ago by Salamandern
            Find an object in a collection with underscore. Using the filter function from underscore.
        
        
        
            0 
        
        
            1071 
        
                    posted 12 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 
        
        
            1699 
        
                    posted 12 years ago by leodruker
            Generic function - Pass the context to the function for use with any field
        
        
        
            0 
        
        
            1499 
        
                    posted 12 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 
        
        
            1526 
        
                    posted 12 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 
        
        
            2295 
        
                    posted 12 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 
        
        
            2628 
        
                    posted 12 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 
        
        
            1602 
        
                    posted 12 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 
        
        
            1179 
        
                    posted 12 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 
        
        
            14250 
        
                    posted 12 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 
        
        
            2662 
        
                    posted 12 years ago by apphp-snippets
            
