Welcome To Snipplr
Everyone's Recent JavaScript Snippets
- All /
 - JavaScript /
 - HTML /
 - PHP /
 - CSS /
 - Ruby /
 - Objective C
 
Simulates a click on a page with the name you put in the parameter in the onclick function.
        
        
        
            1 
        
        
            1893 
        
                    posted 11 years ago by Reiff
            Simple functions to add, fetch or delete cookies in the browser via JavaScript.
        
        
        
            0 
        
        
            1209 
        
                    posted 11 years ago by deanhouseholder
            - I have not tested on android
- This is not animated as I did not need it for my needs. To make it animated, look at the second to last line in the function `layer3.transform = Ti.UI.create2DMatrix().rotate(angle);` You should be able to animate th...
        
        
        
            0 
        
        
            2616 
        
                    posted 11 years ago by rondog
            Javascript to open a URL in a new window without triggering a browser's pop-up blocker. (May not work in callbacks, but not sure why.)
        
        
        
            1 
        
        
            3004 
        
                    posted 11 years ago by eklemen
            Sometimes you need the page dynamically changes a texbox with a dropdown box. On the example below we show you how to perform this work. The first way demonstrates how to do this with remove() and append() jQuery methods and the second shows how to p...
        
        
        
            1 
        
        
            6098 
        
                    posted 11 years ago by apphp-snippets
            Class member encapsulation in JavaScript is very important thing and may be implemented with easy. To define private property or method just use var before the definition or this., if you need to give a public access to property or method.
        
        
        
            0 
        
        
            2448 
        
                    posted 11 years ago by apphp-snippets
            In this article I will show you how to use AngularJS and Laravel Blade together.
People who have been using AngularJS for a while may know of this solution. However if you are just getting started or have never used Angular with a templating engine...
        
        
        
            0 
        
        
            1705 
        
                    posted 11 years ago by CreativePunch
            Add / Remove comma for number in the thousands. Ex: 1,000
Useful for grabbing input values to format then display, remove the comma and convert back to number to do math.
        
        
        
            0 
        
        
            3031 
        
                    posted 11 years ago by supawaza
            Dynamic equal height columns that account for padding and borders.
        
        
        
            1 
        
        
            2439 
        
                    posted 11 years ago by o0110o
            Calculates the time in hh:mm:ss between two dates
Usage: 
var past = new Date('1/1/2013'); 
var now = new Date();
var lapsed = past.lapsed(now);
        
        
        
            0 
        
        
            2198 
        
                    posted 11 years ago by camdagr8
            Function enables the reading of url appended variables. See URL for more information.
        
        
        
            0 
        
        
            2422 
        
                    posted 11 years ago by gromitski
            Uses the object prototype to extend data. Instantiate as an object and use as specified below (bottom of the code)
        
        
        
            0 
        
        
            1314 
        
                    posted 11 years ago by rickygri
            A quick function that makes it easy to convert an integer into a number string with commas inserted.
        
        
        
            0 
        
        
            1400 
        
                    posted 12 years ago by uberdragon
            Usage: 
var a = ['a','a','a'];
var b = a.AllValuesSame(): //true
var a ['1','1','2'];
var b = a.AllValuesSame(); //false
        
        
        
            0 
        
        
            4455 
        
                    posted 12 years ago by uberdragon
            This will calculate the ticks for google charts so that you can have a chart with a defined height, and still represent large data ranges with out all the vertical information getting bunched up together.
        
        
        
            0 
        
        
            1306 
        
                    posted 12 years ago by uberdragon
            I don't really know how other people do this kind of thing, but this was my take.
        
        
        
            0 
        
        
            2393 
        
                    posted 12 years ago by domramirez
            You can put the user's cursor inside a text box or put focus on select box as soon as your page is loaded. This helps ensure that visitors do not 'overlook' an important form item on your site and this snippet only uses one line of code!
        
        
        
            0 
        
        
            1401 
        
                    posted 12 years ago by apphp-snippets
            Nowadays majority of sites uses the jQuery JavaScript library. A lot of them also make use of Google's hosted version of the library from some reasons: faster loading, better cross site caching etc. However, what if there is ever a problem and jQuery...
        
        
        
            0 
        
        
            1111 
        
                    posted 12 years ago by apphp-snippets
            More info: http://stackoverflow.com/questions/10908562/is-there-something-similar-to-window-load-for-executing-a-function-after
        
        
        
            0 
        
        
            2407 
        
                    posted 12 years ago by rickygri
            * Used to create markers based solely on latitude and longitude
* Replace the existing mainPoints() function in map-functions.js
        
        
        
            0 
        
        
            1374 
        
                    posted 12 years ago by tymartist
            $(document).ready(function() {
  // Handler for .ready() called.
});
        
        
        
            0 
        
        
            1575 
        
                    posted 12 years ago by thesmu
            Include any external text file within html; HTML, CSS and Javascript all work.
        
        
        
            0 
        
        
            2353 
        
                    posted 12 years ago by nshakin
            Works in SP2013 (and I believe 2010). Provides site collection URL without trailing "/"
        
        
        
            0 
        
        
            2469 
        
                    posted 12 years ago by rumremix
            jQuery Validate is used in ASP.Net MVC 4. As it is checking only en-US as a default you may have problems with different cultures for decimal inputs and dates (I had to try for minutes to find a accepted date format. I don't want to see how my custom...
        
        
        
            0 
        
        
            1409 
        
                    posted 12 years ago by SnipplrSlush
            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 
        
        
            1439 
        
                    posted 12 years ago by pussard