Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged c



1 ... 21 22 23 24 25 ... 65
Normal replace() function only replaces first instance.
1 2567 posted 15 years ago by rumremix
Found that the webmonkey tutorial code didn't work as double quotes were used around JSON string.
0 1702 posted 15 years ago by eddequincey
Use this to enhance non firefox browsers to support the sendAsBinary method.
1 1529 posted 15 years ago by theshoveller
Cross domain issues occur when trying to read files such as .xml files of one domain in an other domain (two different websites, ie different IP:Port)
0 1684 posted 15 years ago by vriesdewie
JS to be perfomed on the users first visit to a page
0 1771 posted 15 years ago by primitiveshaun
Simple ajax object for creating ajax calls. Why use SimpleAjax? - Very small, only 2kb minified - Make a asynchrone or synchrone ajax call ( AJAX / SJAX ) - Use quick methods get() and post() for GET and POST calls - Use load() method for...
0 1664 posted 15 years ago by freelancephp
Modified regex of URL Matcher found on http://daringfireball.net/2010/07/improved_regex_for_matching_urls
0 1911 posted 15 years ago by naren1012
Last step of the installation - Function documentation.
1 2089 posted 15 years ago by Whiteagle
I wanted to pass a form submission (array) as a JSON object to another function. Some form field were created with JS, to identify them their names have been concatenated with unique IDs, etc. In order to access values of that JSON obj I needed to...
1 2364 posted 15 years ago by iroybot
I wanted to pass a form submission (array) as a JSON object to another function. Some form field were created with JS, to identify them their names have been concatenated with unique IDs, etc. In order to access values of that JSON obj I needed to...
0 2217 posted 15 years ago by iroybot
**Use this line to anonymize IP adresses in Google Analytics:** _gaq.push(['_gat._anonymizeIp']);
0 1650 posted 15 years ago by JonasDoebertin
Reminder of the assertions possible with jstestdriver
0 1361 posted 15 years ago by ddubyah17
Hopefully this covers just about everything. This code has far more lines than htmlify.js but seems to work ok. (I just remembered that " // Loop through the clear text " has no loop breaker - will post a fix, but it's not a show-stopper for mo...
0 3497 posted 15 years ago by jm1248
All glory to the ml function.
0 1901 posted 15 years ago by pablo_PXL
* example: google.com/reader/view/ folder = /reader * example: google.com/reader folder = / * example: google.com folder = ''
0 3026 posted 15 years ago by markux
2 1543 posted 15 years ago by prit
0 1559 posted 15 years ago by BebenKoben
0 1619 posted 15 years ago by BebenKoben
// big thanks to these tips for giving me code to steal: http://bit.ly/bundles/brandonjp/9 /* * USAGE: give your HTML textarea or text input element an ID * give your button an onClick="insertThisInThere(text2insert, theInputIDwhereItGoes);"...
0 4764 posted 15 years ago by brandonjp
f you wish to use any of the meta-characters ( such as !"#$%&'()*+,./:;?@[\]^`{|}~ ) as a literal part of a name, you must escape the character with two backslashes: \\. For example, if you have an an element with id="foo.bar", you can use the select...
0 1553 posted 15 years ago by bitstream
Guess the type of any object applying ducktyping
1 1591 posted 15 years ago by pablo_PXL
I like how this site uses jQuery to center some elements and I wanted to save the code incase they change their site ever.
2 1941 posted 15 years ago by greenconure
0 1793 posted 15 years ago by BebenKoben
Template for a Object Literal Architecture in javascript, in this case jQuery
0 1696 posted 15 years ago by athanassiadis
This snippet could be useful if you use an div based design eg. with a slider or something similar. it grabs variables from the base url splitted by "#". So you can browse to your site like "http://www.example.com/#1#2" and use the first and secon...
0 2166 posted 15 years ago by disas
Generates random hex values ("You know, these guys: #0afec0, #c9f2d0, #9b923e")
1 2116 posted 15 years ago by mike_fowler
1 1479 posted 15 years ago by tgarceau
1 ... 21 22 23 24 25 ... 65