<?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/prototype</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Fri, 24 May 2013 19:12:51 GMT</pubDate>
<item>
<title>(JavaScript) Class Manipulation - ChristianOttinger</title>
<link>http://snipplr.com/view/64406/class-manipulation/</link>
<description><![CDATA[ <p>Element.prototype functions to manipulate element classes.</p> ]]></description>
<pubDate>Sat, 07 Apr 2012 05:48:04 GMT</pubDate>
<guid>http://snipplr.com/view/64406/class-manipulation/</guid>
</item>
<item>
<title>(JavaScript) Alternative for \"for...in\" loop - hellowouter</title>
<link>http://snipplr.com/view/64239/alternative-for-forin-loop/</link>
<description><![CDATA[ <p>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 order. The loop stops when a "falsy" item is found (such as undefined).

Note that this trick should only be used for arrays which you know do not contain "falsy" values (arrays of objects or DOM nodes for example). If you are iterating over numeric data that might include a 0 or string data that might include the empty string you should use a standard for loop.

Note that if someone added new properties to Array.prototype, using a "for...in" loop is no option since the loop will also iterate over the new prototype properties.</p> ]]></description>
<pubDate>Fri, 30 Mar 2012 19:10:51 GMT</pubDate>
<guid>http://snipplr.com/view/64239/alternative-for-forin-loop/</guid>
</item>
<item>
<title>(JavaScript) Parse URI parameters with Prototype JS - srka</title>
<link>http://snipplr.com/view/62361/parse-uri-parameters-with-prototype-js/</link>
<description><![CDATA[ <p>This will return the value of "param" form the URI. For example if you have 

www.example.com/index.html?param=some_value

it will return "some_value".

NOTE! This only works if you use Prototype JavaScript framework.</p> ]]></description>
<pubDate>Fri, 06 Jan 2012 21:03:25 GMT</pubDate>
<guid>http://snipplr.com/view/62361/parse-uri-parameters-with-prototype-js/</guid>
</item>
<item>
<title>(JavaScript) JavaScript Object Prototypal inheritance - luizlopes</title>
<link>http://snipplr.com/view/60905/javascript-object-prototypal-inheritance/</link>
<description><![CDATA[ <p>an operator that implements true prototypal Object inheritance in JavaScript</p> ]]></description>
<pubDate>Thu, 17 Nov 2011 05:10:33 GMT</pubDate>
<guid>http://snipplr.com/view/60905/javascript-object-prototypal-inheritance/</guid>
</item>
<item>
<title>(JavaScript) Classes objects  prototype and static - devnull69</title>
<link>http://snipplr.com/view/56009/classes-objects--prototype-and-static/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 01 Jul 2011 22:32:55 GMT</pubDate>
<guid>http://snipplr.com/view/56009/classes-objects--prototype-and-static/</guid>
</item>
<item>
<title>(JavaScript) JavaScript String gsub - kendsnyder</title>
<link>http://snipplr.com/view/54770/javascript-string-gsub/</link>
<description><![CDATA[ <p>Based on Prototype JS String#gsub</p> ]]></description>
<pubDate>Thu, 02 Jun 2011 15:23:07 GMT</pubDate>
<guid>http://snipplr.com/view/54770/javascript-string-gsub/</guid>
</item>
<item>
<title>(JavaScript) switch elements index - neilking</title>
<link>http://snipplr.com/view/51112/switch-elements-index/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 25 Mar 2011 15:01:57 GMT</pubDate>
<guid>http://snipplr.com/view/51112/switch-elements-index/</guid>
</item>
<item>
<title>(JavaScript) Fade Appear Solution - alassiter</title>
<link>http://snipplr.com/view/47809/fade-appear-solution/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 25 Jan 2011 04:09:14 GMT</pubDate>
<guid>http://snipplr.com/view/47809/fade-appear-solution/</guid>
</item>
<item>
<title>(JavaScript) Query string mapper (String to Object) - Pjotor</title>
<link>http://snipplr.com/view/46738/query-string-mapper-string-to-object/</link>
<description><![CDATA[ <p>A simple prototype function to make objects out of url query strings.   
(bonus jQuery plugin)</p> ]]></description>
<pubDate>Sat, 08 Jan 2011 01:58:05 GMT</pubDate>
<guid>http://snipplr.com/view/46738/query-string-mapper-string-to-object/</guid>
</item>
<item>
<title>(JavaScript) Prototype equivalent for jQuery document.ready - dkl3in</title>
<link>http://snipplr.com/view/43645/prototype-equivalent-for-jquery-documentready/</link>
<description><![CDATA[ <p>Runs JS after DOM load.
Works since Prototype Version 1.6.0</p> ]]></description>
<pubDate>Fri, 05 Nov 2010 20:38:54 GMT</pubDate>
<guid>http://snipplr.com/view/43645/prototype-equivalent-for-jquery-documentready/</guid>
</item>
<item>
<title>(JavaScript) Highlight Table Row by Clicking on the Row - chopbust</title>
<link>http://snipplr.com/view/43485/highlight-table-row-by-clicking-on-the-row/</link>
<description><![CDATA[ <p>This is a snippet to highlight the clicked row. The code is in Prototype library format. I am yet to port this into JQuery, but please do email me if you already did.</p> ]]></description>
<pubDate>Wed, 03 Nov 2010 18:53:14 GMT</pubDate>
<guid>http://snipplr.com/view/43485/highlight-table-row-by-clicking-on-the-row/</guid>
</item>
<item>
<title>(JavaScript) prototype check if element exists - dmistriotis</title>
<link>http://snipplr.com/view/40420/prototype-check-if-element-exists/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 13 Sep 2010 20:31:35 GMT</pubDate>
<guid>http://snipplr.com/view/40420/prototype-check-if-element-exists/</guid>
</item>
<item>
<title>(JavaScript) easy QR code - Pjotor</title>
<link>http://snipplr.com/view/36414/easy-qr-code/</link>
<description><![CDATA[ <p>This "plug in" (only a url builder really) returns the path to a QR code built by google chart api with the code of your choice and optional size (2:nd argument, 160px default).

Usage: $().qrcode("hello world") or $().qrcode("hello world",100)


Update!
Added prototype version.
Rebuilds image to a QRcode from the google charts API; 

ex. 
document.getElementById("myImage").qrcode("hello world")
makes the image with ID "myImage" to a QRcode with value "hello world"</p> ]]></description>
<pubDate>Mon, 28 Jun 2010 19:00:13 GMT</pubDate>
<guid>http://snipplr.com/view/36414/easy-qr-code/</guid>
</item>
<item>
<title>(JavaScript) JavaScript: Reverse String [Extended Native] - cfleschhut</title>
<link>http://snipplr.com/view/33407/javascript-reverse-string-extended-native/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 28 Apr 2010 05:17:24 GMT</pubDate>
<guid>http://snipplr.com/view/33407/javascript-reverse-string-extended-native/</guid>
</item>
<item>
<title>(JavaScript) Hex encode &amp;amp; decode String prototype - Pjotor</title>
<link>http://snipplr.com/view/30964/hex-encode--decode-string-prototype/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 06 Apr 2010 07:03:56 GMT</pubDate>
<guid>http://snipplr.com/view/30964/hex-encode--decode-string-prototype/</guid>
</item>
<item>
<title>(JavaScript) numbers range - Piotrek290</title>
<link>http://snipplr.com/view/29012/numbers-range/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 27 Feb 2010 08:56:09 GMT</pubDate>
<guid>http://snipplr.com/view/29012/numbers-range/</guid>
</item>
<item>
<title>(JavaScript) Javascript OOP Form Validator - alvincrespo</title>
<link>http://snipplr.com/view/28592/javascript-oop-form-validator/</link>
<description><![CDATA[ <p>Just thought id put up a version of my form validation class. It will be expanded in the future but I thought Id let everyone have a look.

# Update 0.1  #
    *   Create Error List Function
    *   Validate Email Address Function
    *   Validate Length of field</p> ]]></description>
<pubDate>Fri, 19 Feb 2010 03:12:07 GMT</pubDate>
<guid>http://snipplr.com/view/28592/javascript-oop-form-validator/</guid>
</item>
<item>
<title>(JavaScript) Javascript OOP Example (Constructor Version) - alvincrespo</title>
<link>http://snipplr.com/view/28569/javascript-oop-example-constructor-version/</link>
<description><![CDATA[ <p>This is a simple example of OOP in Javascript, based off the highly popular Javascript "The Definitive Guide" book by David Flanagan. I will be expanding this example in the future, let me know what you'd like to see.  Thanks!

Note: You must have firebug for firefox to see the results of console.log()</p> ]]></description>
<pubDate>Thu, 18 Feb 2010 16:10:15 GMT</pubDate>
<guid>http://snipplr.com/view/28569/javascript-oop-example-constructor-version/</guid>
</item>
<item>
<title>(JavaScript) Select all li children from ul without the last-child - shapeshifta</title>
<link>http://snipplr.com/view/27316/select-all-li-children-from-ul-without-the-lastchild/</link>
<description><![CDATA[ <p>Mimic CSS for ie6+7</p> ]]></description>
<pubDate>Fri, 29 Jan 2010 11:23:03 GMT</pubDate>
<guid>http://snipplr.com/view/27316/select-all-li-children-from-ul-without-the-lastchild/</guid>
</item>
<item>
<title>(JavaScript) jQuery and Prototype Script Conflict - philokezzar</title>
<link>http://snipplr.com/view/27058/jquery-and-prototype-script-conflict/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 25 Jan 2010 17:48:25 GMT</pubDate>
<guid>http://snipplr.com/view/27058/jquery-and-prototype-script-conflict/</guid>
</item>
</channel>
</rss>