Welcome To Snipplr
Everyone's Recent JavaScript Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Returns the version of Windows Internet Explorer or a -1 (indicating the use of another browser).
0
1003
posted 13 years ago by satie83
This little Gem allows me to click a link on the page automatically a few seconds after the page loads.
1
911
posted 13 years ago by gera3d
Very cool example of copying a frame from an MP4 and displaying it on the canvas or image. In order for images to be saved, the video must come from the same domain
0
5154
posted 13 years ago by chrisaiv
This script was written to allow transposing of utm_campaign, utm_source and utm_medium query parameters from the URL of a landing page link to all of the links on that page that re-directed to the primary domain where users would actually convert. T...
0
908
posted 13 years ago by kynatro
This script was written to allow transposing of utm_campaign, utm_source and utm_medium query parameters from the URL of a landing page link to all of the links on that page that re-directed to the primary domain where users would actually convert. T...
0
916
posted 13 years ago by kynatro
We are setting up two variables. The assignment in the middle part of the for loop is also tested for truthfulness — if it succeeds, the loop continues. Since i is incremented each time, items from the array will be assigned to item in sequential o...
0
1329
posted 13 years ago by hellowouter
In this purely constructed example, we create anonymous function and use call to invoke it on every object in an array. The main purpose of the anonymous function here is to add a print function to every object, which is able to print the right index...
0
1086
posted 13 years ago by hellowouter
Clever usage of apply allows you to use built-ins functions for some tasks that otherwise probably would have been written by looping over the array values. As an example here we are going to use Math.max/Math.min to find out the maximum/minimum valu...
0
1532
posted 13 years ago by hellowouter
Valida por medio del metodo onkeypress de un campo input, que solo se ingresen string /[a-zA-Z]/
0
1140
posted 13 years ago by serialk89
I hate manually entering in tons of numbers and tags for numbers, so I made a loop for it.
0
1069
posted 13 years ago by JonnyCraze
Here's how to use this:
* To access something in the local storage, type `Evan.local('name')`. You may need to use `JSON.parse()` on this result. Returns `null` if nothing's there.
* To assign something in the local storage, type `Evan.local('nam...
1
911
posted 13 years ago by EvanHahn
This prepends a `#` if it's not already there. Useful when doing jQuery selectors.
0
746
posted 13 years ago by EvanHahn
`Object.create(null)` is a more memory-efficient way to make objects, but it's not supported in all versions of JavaScript, so you can do the "old-fashioned" `{}` if that function isn't available.
0
1027
posted 13 years ago by EvanHahn
The below script list out the available tags based on the character you enter in the Tag field and the available tags in the array. All the user submitted tags through the Tag form will be stored in an array. Use the below script to enable the auto-c...
1
965
posted 13 years ago by aruldave
Often in Flash, the mouse is used to zoom or scroll, and by default the document <body> tag will also pick this up, making the page scroll away - which is annoying when you just want to view the Flash element.
This snippet intercepts mouse scroll...
0
1145
posted 13 years ago by singalongwithdavehotmailcom
this code is used to remove the html code in the given string
1
958
posted 13 years ago by satinfo30
Function to validate the existence of each key in the object to get the number of valid key/value pairs.
0
1000
posted 13 years ago by reverend
다양한 형태로 jQuery를 ì´ìš©í•˜ì—¬ DOM ìš”ì†Œì— ì´ë²¤íŠ¸ë¥¼ 다는 방법
0
873
posted 13 years ago by safe1981
Remove initial inputfield value on focus.. and place it back on blur in case of empty value.
0
1010
posted 13 years ago by hoogvlieger
Shows how to use an array to embed swf objects with swfobject.js. This allows for multiple embeds (synced ad's etc.)
0
955
posted 13 years ago by rickygri