<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/language/javascript/tags/function</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Thu, 23 May 2013 20:12:59 GMT</pubDate>
<item>
<title>(JavaScript) Template for a Javascript function with optional and mandatory arguments passed as an object collection - davidwaterston</title>
<link>http://snipplr.com/view/68920/template-for-a-javascript-function-with-optional-and-mandatory-arguments-passed-as-an-object-collection/</link>
<description><![CDATA[ <p>A simple template for a JavaScript function which allows for an arbitrary number of named arguments to be passed in. This is achieved by passing a single object as an argument with each of the 'real' arguments being a key/value pair. In this way arguments can be passed in any order and we can easily add in new arguments.

To call, simply pass in an object with the required arguments:
    myFunction ({opt1: 'cat', opt4: 'dog', opt2: 'monkey'})

Validates clean in jsLint.</p> ]]></description>
<pubDate>Mon, 03 Dec 2012 07:48:27 GMT</pubDate>
<guid>http://snipplr.com/view/68920/template-for-a-javascript-function-with-optional-and-mandatory-arguments-passed-as-an-object-collection/</guid>
</item>
<item>
<title>(JavaScript) A function that uses images to perform a countdown. - o0110o</title>
<link>http://snipplr.com/view/67847/a-function-that-uses-images-to-perform-a-countdown/</link>
<description><![CDATA[ <p>Set the desired date within the function. 
Make some images and label them "1.jpg, 2.jpg, 3.jpg, etc...".
That's how it's done.</p> ]]></description>
<pubDate>Sun, 21 Oct 2012 03:32:38 GMT</pubDate>
<guid>http://snipplr.com/view/67847/a-function-that-uses-images-to-perform-a-countdown/</guid>
</item>
<item>
<title>(JavaScript) Function to simulate PHP $_GET in javascript - sergiazow</title>
<link>http://snipplr.com/view/67067/function-to-simulate-php-get-in-javascript/</link>
<description><![CDATA[ <p>Simulate the $_GET array from php in javascript to get url parameters this way:
url= http://localhost/?var1=example
$_GET['var1'] will return "example"

Just copy and paste the code.</p> ]]></description>
<pubDate>Thu, 06 Sep 2012 04:42:41 GMT</pubDate>
<guid>http://snipplr.com/view/67067/function-to-simulate-php-get-in-javascript/</guid>
</item>
<item>
<title>(JavaScript) Declaring Functions - DonovanGlover</title>
<link>http://snipplr.com/view/66886/declaring-functions/</link>
<description><![CDATA[ <p>Different ways to declare functions in JavaScript.</p> ]]></description>
<pubDate>Fri, 24 Aug 2012 09:42:24 GMT</pubDate>
<guid>http://snipplr.com/view/66886/declaring-functions/</guid>
</item>
<item>
<title>(JavaScript) Using call to invoke an anonymous function - hellowouter</title>
<link>http://snipplr.com/view/64237/using-call-to-invoke-an-anonymous-function/</link>
<description><![CDATA[ <p>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 of the object in the array. Passing the object as this value was not strictly necessary, but is done for explanatory purpose.</p> ]]></description>
<pubDate>Fri, 30 Mar 2012 18:53:13 GMT</pubDate>
<guid>http://snipplr.com/view/64237/using-call-to-invoke-an-anonymous-function/</guid>
</item>
<item>
<title>(JavaScript) JavaScript Function Default Arguments (Full Object Merge) - viskenxp</title>
<link>http://snipplr.com/view/63636/javascript-function-default-arguments-full-object-merge/</link>
<description><![CDATA[ <p>This snippet uses jQuery.extend() to merge the objects.</p> ]]></description>
<pubDate>Wed, 29 Feb 2012 21:05:06 GMT</pubDate>
<guid>http://snipplr.com/view/63636/javascript-function-default-arguments-full-object-merge/</guid>
</item>
<item>
<title>(JavaScript) Optional function arguments/parameters by using associative array - coprolit</title>
<link>http://snipplr.com/view/62307/optional-function-argumentsparameters-by-using-associative-array/</link>
<description><![CDATA[ <p>By not being limited to provide certain arguments/parameters in right order when calling a function, makes the function more versatile and easier to extend without breaking old code (e.g. calls to the function). 
One solution is to pass an associative array holding the parameters. 
Advantage: argument order is unnecessary, each argument have a label - easier to remember.</p> ]]></description>
<pubDate>Thu, 05 Jan 2012 00:13:08 GMT</pubDate>
<guid>http://snipplr.com/view/62307/optional-function-argumentsparameters-by-using-associative-array/</guid>
</item>
<item>
<title>(JavaScript) addLoadEvent function - alberomo</title>
<link>http://snipplr.com/view/57087/addloadevent-function/</link>
<description><![CDATA[ <p>Description: Execute different functions when the page loads in a better way than default onload JS event. Include it in the end of the JS document.
Arguments: Name of the function that you want to execute when the page loads.
Author: Simon Willison</p> ]]></description>
<pubDate>Mon, 25 Jul 2011 00:11:55 GMT</pubDate>
<guid>http://snipplr.com/view/57087/addloadevent-function/</guid>
</item>
<item>
<title>(JavaScript) Call IFrame Javascript function from parent document/window - alexscript</title>
<link>http://snipplr.com/view/55691/call-iframe-javascript-function-from-parent-documentwindow/</link>
<description><![CDATA[ <p>This snippet lets you call a Javascript function declared within an IFrame from the parent element of the IFrame</p> ]]></description>
<pubDate>Sat, 25 Jun 2011 05:48:03 GMT</pubDate>
<guid>http://snipplr.com/view/55691/call-iframe-javascript-function-from-parent-documentwindow/</guid>
</item>
<item>
<title>(JavaScript) Self invocking javascript function - YA</title>
<link>http://snipplr.com/view/47445/self-invocking-javascript-function/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 19 Jan 2011 00:26:47 GMT</pubDate>
<guid>http://snipplr.com/view/47445/self-invocking-javascript-function/</guid>
</item>
<item>
<title>(JavaScript) Check or Uncheck all Checkboxes - fauverism</title>
<link>http://snipplr.com/view/46743/check-or-uncheck-all-checkboxes/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 08 Jan 2011 03:31:22 GMT</pubDate>
<guid>http://snipplr.com/view/46743/check-or-uncheck-all-checkboxes/</guid>
</item>
<item>
<title>(JavaScript) javascript function within a function to repeat itself js jquery jq loop looping - brandonjp</title>
<link>http://snipplr.com/view/37766/javascript-function-within-a-function-to-repeat-itself-js-jquery-jq-loop-looping/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 23 Jul 2010 05:50:21 GMT</pubDate>
<guid>http://snipplr.com/view/37766/javascript-function-within-a-function-to-repeat-itself-js-jquery-jq-loop-looping/</guid>
</item>
<item>
<title>(JavaScript) Random Number (Float) Generator - Jamie</title>
<link>http://snipplr.com/view/37687/random-number-float-generator/</link>
<description><![CDATA[ <p>Simple function to return a decimal value between the minValue and the maxValue.</p> ]]></description>
<pubDate>Wed, 21 Jul 2010 03:01:29 GMT</pubDate>
<guid>http://snipplr.com/view/37687/random-number-float-generator/</guid>
</item>
<item>
<title>(JavaScript) Random Number (Integer) Generator - Jamie</title>
<link>http://snipplr.com/view/37686/random-number-integer-generator/</link>
<description><![CDATA[ <p>Simple function to return a value between the minValue and the maxValue.</p> ]]></description>
<pubDate>Wed, 21 Jul 2010 02:54:18 GMT</pubDate>
<guid>http://snipplr.com/view/37686/random-number-integer-generator/</guid>
</item>
<item>
<title>(JavaScript) MOOTOOLS JS - Clear input field onClick onFocus on click focus active - brandonjp</title>
<link>http://snipplr.com/view/36794/mootools-js--clear-input-field-onclick-onfocus-on-click-focus-active/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 07 Jul 2010 04:27:40 GMT</pubDate>
<guid>http://snipplr.com/view/36794/mootools-js--clear-input-field-onclick-onfocus-on-click-focus-active/</guid>
</item>
<item>
<title>(JavaScript) jsCookies - my simple easy pure js javascript cookies function - brandonjp</title>
<link>http://snipplr.com/view/36790/jscookies--my-simple-easy-pure-js-javascript-cookies-function/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 07 Jul 2010 04:01:09 GMT</pubDate>
<guid>http://snipplr.com/view/36790/jscookies--my-simple-easy-pure-js-javascript-cookies-function/</guid>
</item>
<item>
<title>(JavaScript) dump array - BFTrick</title>
<link>http://snipplr.com/view/35168/dump-array/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 24 May 2010 09:57:46 GMT</pubDate>
<guid>http://snipplr.com/view/35168/dump-array/</guid>
</item>
<item>
<title>(JavaScript) Default arguments in Javascript functions - marcio</title>
<link>http://snipplr.com/view/27760/default-arguments-in-javascript-functions/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 05 Feb 2010 14:30:19 GMT</pubDate>
<guid>http://snipplr.com/view/27760/default-arguments-in-javascript-functions/</guid>
</item>
<item>
<title>(JavaScript) Object Runtime Fields Evaluator - straps</title>
<link>http://snipplr.com/view/17314/object-runtime-fields-evaluator/</link>
<description><![CDATA[ <p>Runtime Object Evaluator; search for string object properties that start with !! and eval the content. 
Very useful if you want to load JSON from file and evaluate its fields on effective usage or access global variables at runtime.
[Follow me on Twitter for updates](http://twitter.com/fstraps/ "fstraps on Twitter")</p> ]]></description>
<pubDate>Wed, 22 Jul 2009 03:25:23 GMT</pubDate>
<guid>http://snipplr.com/view/17314/object-runtime-fields-evaluator/</guid>
</item>
<item>
<title>(JavaScript) When to use the prototype of a Function - segdeha</title>
<link>http://snipplr.com/view/15534/when-to-use-the-prototype-of-a-function/</link>
<description><![CDATA[ <p>Assign methods to a Function prototype when you intend to create instances of the type of object. Use object literals when you just need a container for functions.</p> ]]></description>
<pubDate>Thu, 04 Jun 2009 17:13:20 GMT</pubDate>
<guid>http://snipplr.com/view/15534/when-to-use-the-prototype-of-a-function/</guid>
</item>
</channel>
</rss>