<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Unwrongest &#187; plugin</title>
	<atom:link href="http://www.unwrongest.com/tag/plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.unwrongest.com</link>
	<description>Interaction Designer and Interface Developer</description>
	<lastBuildDate>Wed, 30 Jun 2010 11:24:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Tabify &#8211; Tabbed content with ease (jQuery plugin)</title>
		<link>http://www.unwrongest.com/projects/tabify/</link>
		<comments>http://www.unwrongest.com/projects/tabify/#comments</comments>
		<pubDate>Thu, 07 May 2009 03:57:01 +0000</pubDate>
		<dc:creator>Jan Jarfalk</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://unwr/?p=172</guid>
		<description><![CDATA[This Jquery plugin lets you easily create tabbed content. All you need is an ul-element with some li-elements and a couple of related content-divs. The major difference between Tabify and it's competitors is it's size.]]></description>
			<content:encoded><![CDATA[<h2>How to use Tabify</h2>
<p>It is very easy to use Tabify. All you need to do is to create an ul-list, fill it with a couple of li-elements with containing links (tabs) and create a couple of matching content divs. In the example below notice how the href-attribute on the link elements corresponds to the content div IDs.</p>
<pre class="brush: xml;">
&lt;ul id=&quot;menu&quot;&gt;
	&lt;li class=&quot;active&quot;&gt;&lt;a href=&quot;#contentHome&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#contentGuestbook&quot;&gt;Guestbook&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#contentLinks&quot;&gt;Links&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div id=&quot;contentHome&quot;&gt;Content for Home&lt;/div&gt;
&lt;div id=&quot;contentGuestbook&quot;&gt;My guestbook&lt;/div&gt;
&lt;div id=&quot;contentLinks&quot;&gt;Links&lt;/div&gt;
</pre>
<p>When you have created the necessary html code you need to include the javascript file with the plugin and call the tabify method.</p>
<pre class="brush: jscript;">$('ul').tabify();</pre>
<table class="project-table">
<caption>Change log</caption>
<thead>
<tr>
<th class="version">Version</th>
<th class="changes">Changes</th>
</tr>
</thead>
<tbody>
<tr>
<td>1.4</td>
<td>Fixed an issue where a malformed hash would make Tabify crash.</td>
</tr>
<tr>
<td>1.3</td>
<td>Fixed an issue causing the page to jump when you clicked on the tabs</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.unwrongest.com/projects/tabify/feed/</wfw:commentRss>
		<slash:comments>40</slash:comments>
		</item>
		<item>
		<title>Elastic &#8211; Make your textareas grow Facebook style jQuery plugin</title>
		<link>http://www.unwrongest.com/projects/elastic/</link>
		<comments>http://www.unwrongest.com/projects/elastic/#comments</comments>
		<pubDate>Wed, 06 May 2009 13:10:06 +0000</pubDate>
		<dc:creator>Jan Jarfalk</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://unwr/?p=150</guid>
		<description><![CDATA[This Jquery plugin makes your textareas grow and shrink to fit it's content. It was inspired by the auto growing textareas on Facebook. The major difference between Elastic and it's competitors is it's weight.]]></description>
			<content:encoded><![CDATA[<p>This Jquery plugin makes your textareas grow and shrink to fit it&#8217;s content. It was inspired by the auto growing textareas on Facebook. The major difference between Elastic and it&#8217;s competitors is it&#8217;s weight.</p>
<p><iframe id="demo" style="border: 1px solid #ccc; width: 620px; height: 300px;" src="http://sandbox.unwrongest.com/forms/jquery.elastic.html"></iframe> </p>
<h2>How to use Elastic</h2>
<p>The usage of Elastic is very straight forward. All you have to do is include the javascript file containing the plugin and use the elastic method.</p>
<pre class="brush: jscript;">
	$('#myTextarea').elastic();
</pre>
<h2>Known issues</h2>
<p><strong>EM</strong> The elastic plugin does work with font sizes, line-heights and such set in em, but it does work better with px. Elastic needs to convert your em value to a pixel value. 1.2em might be 16.56478px which is not exactly the same as 1.2em. After a couple of hundreds of rows the height of the text area is going to be too small or too big.</p>
<table class="project-table">
<caption>Change log</caption>
<thead>
<tr>
<th class="version">Version</th>
<th class="changes">Changes</th>
</tr>
</thead>
<tbody>
<tr>
<td>1.6.4</td>
<td>Fixed issue with minified version and Jquery 1.4.2</td>
</tr>
<tr>
<td>1.6.3</td>
<td>Fixed issue with continuous spaces and words longer than the width of the textarea (Thanks to Michael A Maw,  Eviltwinfletch and  Jibum Jung)</td>
</tr>
<tr>
<td>1.6.2</td>
<td>Fixed an issue with max height in Opera (Thanks to Martin Grandrath)</td>
</tr>
<tr>
<td>1.6.1</td>
<td>Fixed a cpu overhead issue, and changed incorrect css selectors to correct ones.  (Thanks to Eric Caron, Martin Borthiry and Ara T Howard)</td>
</tr>
<tr>
<td>1.6</td>
<td>Fixed an issue with using elastic on multiple textareas (Thanks to Michael for reporting the bug and finding a solution)</td>
</tr>
<tr>
<td>1.5</td>
<td>Complete refactor of the plugin</td>
</tr>
<tr>
<td>1.4</td>
<td>Fixed an issue regarding disappearing carets</td>
</tr>
<tr>
<td>1.3</td>
<td>Made it compatible with JQuery 1.3.2 and added proper support for max-height (scrollbars visible when textarea reaches max height). The animation is removed. (it took to much visual focus and it did not work well with Google Chrome) (Thanks to Casper Fabricius and Marcus Kabele for contributing to this version)</td>
</tr>
<tr>
<td>1.2</td>
<td>Fixed an issue where the textbox height would twitch when using smaller font sizes. (Thanks to Dimitry for reporting the problem and providing a solution.)</td>
</tr>
<tr>
<td>1.1</td>
<td>Fixed a problem with Internet Explorer 6.0 where the plugin didn&#8217;t work if a height attribute in the CSS wasn&#8217;t set. (Thanks to Eric for reporting the problem.).</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.unwrongest.com/projects/elastic/feed/</wfw:commentRss>
		<slash:comments>130</slash:comments>
		</item>
		<item>
		<title>Limit &#8211; Limit the number of characters in a textarea jQuery plugin</title>
		<link>http://www.unwrongest.com/projects/limit/</link>
		<comments>http://www.unwrongest.com/projects/limit/#comments</comments>
		<pubDate>Wed, 06 May 2009 06:03:18 +0000</pubDate>
		<dc:creator>Jan Jarfalk</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://unwr/?p=92</guid>
		<description><![CDATA[Limit is a plugin for the javascript framework Jquery that limits the number of characters that can be entered in a textarea or input field. The plugin can also report the number of characters left before the user reaches the length limit.]]></description>
			<content:encoded><![CDATA[<p>Limit is a plugin for the javascript framework Jquery that limits the number of characters that can be entered in a textarea or input field. The plugin can also report the number of characters left before the user reaches the length limit.</p>
<p><iframe id="demo" style="border: 1px solid #ccc; width: 620px; height: 200px;" src="http://sandbox.unwrongest.com/forms/jquery.limit.html"></iframe> </p>
<h2>How to use Limit</h2>
<p>To use the full power of Limit you need two html elements; one textarea or input field and an element to show amount of characters left. </p>
<pre class="brush: xml;">
You have &lt;span id=&quot;charsLeft&quot;&gt;&lt;/span&gt; chars left.
&lt;textarea id=&quot;myTextarea&quot;&gt;&lt;/textarea&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
    $('#myTextarea').limit('140','#charsLeft');
&lt;/script&gt;
</pre>
<p>If you don&#8217;t want to show the amount of characters left you can do like this.</p>
<pre class="brush: xml;">
&lt;textarea id=&quot;myTextarea&quot;&gt;&lt;/textarea&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
    $('#myTextarea').limit('140');
&lt;/script&gt;
</pre>
<table class="project-table">
<caption>Change log</caption>
<thead>
<tr>
<th class="version">Version</th>
<th class="changes">Changes</th>
</tr>
</thead>
<tbody>
<tr>
<td>1.2</td>
<td>Optimized timed function and fixed an issue with flickering text</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.unwrongest.com/projects/limit/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>Highlight &#8211; Simple text phrase highlighter jQuery plugin</title>
		<link>http://www.unwrongest.com/projects/highlight/</link>
		<comments>http://www.unwrongest.com/projects/highlight/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 13:05:22 +0000</pubDate>
		<dc:creator>Jan Jarfalk</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://unwr/?p=145</guid>
		<description><![CDATA[Highlight is a simple Jquery plugin that highlights text phrases. It has been executed in this post to highlight 'acknowledgment', 'matching' and 'class name'.]]></description>
			<content:encoded><![CDATA[<p>Highlight is a simple Jquery plugin that highlights text phrases. It does so by wrapping one or multiple phrases with a span with the class name &#8220;highlight&#8221;.</p>
<h2>How to use Highlight</h2>
<p>You can throw both a string or an array on Highlight. Have a look at the example below. The first row is going to highlight the word acknowledgment, the second row is going to highlight both &#8216;matching&#8217; and &#8216;class name&#8217;. The code shown in the example below has been executed in this page.</p>
<pre class="brush: js">
	$('.body').highlight("acknowledgment");
	$('.body').highlight(["matching","class name"]);
</pre>
<p>What actually happens is that the matching phrases are wrapped inside a span element with the class name highlight. Therefor you will also need to add some css code to get a visual result.</p>
<pre class="brush: css">
.highlight { background: #ff0; }
</pre>
<table class="project-table">
<caption>Todo</caption>
<thead>
<tr>
<th class="version">Keyword</th>
<th class="changes">Changes</th>
</tr>
</thead>
<tbody>
<tr>
<td>Partiall links</td>
<td>Highlight phrases partially inside an a element (link), In the current version; If a phrase is partially inside a html elemente it will not be highligted.</td>
</tr>
</tbody>
</table>
<h2>Acknowledgment</h2>
<p><strong><a href="http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html">Johann Burkard</a></strong> The core is based on ideas presented in Johann Burkard&#8217;s Jquery plugin with the same name.</p>
<p><script defer="defer" src="http://sandbox.unwrongest.com/jquery.highlight/init.js"></script></p>
<style>.highlight { background: #ff0; }</style>
]]></content:encoded>
			<wfw:commentRss>http://www.unwrongest.com/projects/highlight/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Accordion &#8211; Super simple javascript accordion jQuery plugin</title>
		<link>http://www.unwrongest.com/projects/accordion/</link>
		<comments>http://www.unwrongest.com/projects/accordion/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 02:31:32 +0000</pubDate>
		<dc:creator>Jan Jarfalk</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://unwr/?p=157</guid>
		<description><![CDATA[This Jquery plugin makes creating accordions pain free. Just create an ul list and call the accordion javascript method and it is all done! Also it is super lightweight, just around 0.5kb. This Accordion script sets no limit for the depth of your accordion. You can make it as many level as you want.]]></description>
			<content:encoded><![CDATA[<p>This Jquery plugin makes creating accordions pain free. Just create an ul list and call the accordion javascript method and it is all done! Also it is super lightweight, just around 0.5kb. This Accordion script sets no limit for the depth of your accordion. You can make it as many level as you want.</p>
<h2>How to use Accordion</h2>
<p>It is very easy to use Accordion. All you need to do is to create an ul-list, fill it with a couple of li-elements and div-elements for the content; In the example below if you click on <strong>New York</strong> the div element containing <strong>Information about New York</strong> will show.</p>
<pre class="brush: xml;">
&lt;ul&gt;
    &lt;li&gt;
        &lt;a href=&quot;#america&quot;&gt;America&lt;/a&gt;
        &lt;ul&gt;
            &lt;li&gt;
                &lt;a href=&quot;#america-newyork&quot;&gt;New York&lt;/a&gt;
                &lt;div&gt;Information about New York&lt;/div&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;a href=&quot;#america-sanfransisco&quot;&gt;San Fransisco&lt;/a&gt;
                &lt;div&gt;Information about San Fransisco&lt;/div&gt;
            &lt;/li&gt;
        &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;
        &lt;a href=&quot;#antarctica&quot;&gt;Antarctica&lt;/a&gt;
        &lt;div&gt;Information about Antarctica&lt;/div&gt;
    &lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>When you have created the necessary html code you need to include the javascript file with the plugin and call the accordion method. See the demo for a more detailed example.</p>
<pre class="brush: xml;">$('ul').accordion();</pre>
<h2>Linking to a level inside the accordion</h2>
<p>Notice the href-attributes on each a-element. If you in the html code example above create a link to #america-newyork and click it the accordion will open up &#8216;New York&#8217; and all it&#8217;s parents.</p>
<h2>Open a panel on load</h2>
<p>Set the li classname to &#8220;current&#8221; and it will be open when the page loads.</p>
<table class="project-table">
<caption>Change log</caption>
<thead>
<tr>
<th class="version">Version</th>
<th class="changes">Changes</th>
</tr>
</thead>
<tbody>
<tr>
<td>1.3</td>
<td>Refactored code and fix a bug with images inside a tags</td>
</tr>
<tr>
<td>1.2.2</td>
<td>Added functionality to open a panel on load by specifying the li class to &#8220;current&#8221;.</td>
</tr>
<tr>
<td>1.2.1</td>
<td>Fixed an error that occurred when no hash was set. </td>
</tr>
<tr>
<td>1.2</td>
<td>It is now possible to link to a specific level using a hash</td>
</tr>
<tr>
<td>1.1</td>
<td>Fixed an issue causing the accordion to stop working if you applied the accordion method twice on the same element.</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.unwrongest.com/projects/accordion/feed/</wfw:commentRss>
		<slash:comments>121</slash:comments>
		</item>
		<item>
		<title>Valid8 &#8211; An input field validation plugin for Jquery</title>
		<link>http://www.unwrongest.com/projects/valid8/</link>
		<comments>http://www.unwrongest.com/projects/valid8/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 03:28:45 +0000</pubDate>
		<dc:creator>Jan Jarfalk</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://unwr/?p=164</guid>
		<description><![CDATA[Valid8 solves both simple and complex validation scenarios. Everything from a basic required field to regular expressions, ajax requests and arbitrary javascript functions. There is nothing you can't validate using Valid8.]]></description>
			<content:encoded><![CDATA[<div style="text-align: center; background: #FFBFBF; border: 1px solid #CF1919; padding: 20px; color: #3F0404; margin: 0 0 20px;">
Sunday, 23 June 2009<br />I am currently rewriting this documentation.<br />New segments will pop-up as I write them.<br/>I will twitter with janjarfalk as soon as I am done.</div>
<p>Valid8 features support for three types of validation techniques; Regular expressions, custom javascript functions and Ajax requests. The three techniques can be combined in any way you want. For example, in a very extreme case, you can use two regular expressions, one javascript function and three ajax requests for validating a single input field.</p>
<ol>
<dt>1) <a href="#regexp">Regular expressions</a></dt>
<dd>For determining whether a value matches a regular expresion. For example determining if a user name consists of only letters and numbers.</dd>
<dt>2) <a href="#js">Javascript functions</a></dt>
<dd>Send one or multiple values to a custom function. For example checking if the &#8216;password&#8217; and the &#8216;confirm password&#8217; input field matches each other.</dd>
<dt>3) <a href="#ajax">Ajax requests</a></dt>
<dd>Post one or multiple values to a external file. For example to see if a user name already exists in the database.</dd>
</ol>
<h2>Examples and demos</h2>
<p>Valid8 ranges from super simple &#8216;making an input field required&#8217; to an near endless possibility of complexity. I think the best way for me to describe how Valid8s individual parts is by showing you a set of examples.</p>
<ol>
<dt><a href="#">How to make an input field required</a></dt>
<dd>This example will show you how to make an input field required and show the default validation message &#8216;Required&#8217; if the field is left empty.</dd>
<dt><a href="#">How to make an input field required and show a custom error message</a></dt>
<dd>This example will show you how to make an input field required and show a custom validation message if the field is left empty.</dd>
<dt><a href="#">How to validate with a single regular expression</a></dt>
<dd>This example will show you how to validate using a regular expression that dictates that the input field(s) only can contain letters and numbers.</dd>
<dt><a href="#">How to validate with multiple regular expressions</a></dt>
<dd>This example will show you how to validate using two regular expressions. One that dictates that the input field is required and one  that the input field only can contain letters and numbers. Valid8 will show a different validation message depending on which regular expression it violates first. </dd>
<dt><a href="#">How to validate with a javascript function</a></dt>
<dd>This is example will show you how to compare the Password field with the Confirm Password field and make Confirm Passoword invalid if it doesn&#8217;t match the Password field.</dd>
<dt><a href="#">How to validate using an ajax request</a></dt>
<dd>This example will show you how to make see if an email address already is in your database.</dd>
</ol>
<h2>Example &#8211; How to make an input field required</h2>
<p>Calling the valid8 method without any arguments will show the default validation error message &#8216;Required&#8217; if the input field is left empty.</p>
<pre class="brush: jscript;">
    $('#inputUsername').valid8();
</pre>
<p><iframe id="demo" style="border: 1px solid #ccc; width: 620px; height: 140px;" src="http://sandbox.unwrongest.com/forms/jquery.valid8.basic.html"></iframe> </p>
<div class="hr">
<hr /></div>
<h2>Example &#8211; How to make an input field required and show a custom error message</h2>
<p>Calling the valid8 method with a string as an argument will show the string as an a validation error message if the input field is left empty.</p>
<pre class="brush: jscript;">
    $('#inputUsername').valid8('Username is required');
</pre>
<p><iframe id="demo" style="border: 1px solid #ccc; width: 620px; height: 140px;" src="http://sandbox.unwrongest.com/forms/jquery.valid8.basic2.html"></iframe> </p>
<div class="hr">
<hr /></div>
<h2>Example &#8211; How to validate with a single regular expression</h2>
<p>The example below is using a regular expression that dictates that the input field(s) only can contain a-z, A-Z and 0-9. If the value contains for example the character &#8216;@&#8217; the validation message &#8216;You can only use the letters A-Z and numbers&#8217; will be shown.</p>
<pre class="brush: jscript;">
    $('#inputUsername').valid8({
        'regularExpressions': [
            { expression: /^[a-zA-Z0-9]+$/, errormessage: 'You can only use the letters A-Z and numbers'}
        ]
    });
</pre>
<p><iframe id="demo" style="border: 1px solid #ccc; width: 620px; height: 140px;" src="http://sandbox.unwrongest.com/forms/jquery.valid8.regexp.html"></iframe> </p>
<div class="hr">
<hr /></div>
<h2>Example &#8211; How to validate with multiple regular expressions</h2>
<p>The example below is using two regular expressions that dictates that the input field(s) not can be empty and only can contain a-z, A-Z and 0-9. If the value contains for example the character &#8216;@&#8217; the validation message &#8216;You can only use the letters A-Z and numbers&#8217; will be shown. If the field is left completely empty it will show the validation message &#8216;Field is required&#8217;.</p>
<pre class="brush: jscript;">
    $('#inputUsername').valid8({
        'regularExpressions': [
	    { expression: /^.+$/, errormessage: 'Username is required'},
        { expression: /^[a-zA-Z0-9]+$/, errormessage: 'You can only use the letters A-Z and numbers'}
        ]
    });
</pre>
<p><iframe id="demo" style="border: 1px solid #ccc; width: 620px; height: 140px;" src="http://sandbox.unwrongest.com/forms/jquery.valid8.regexp2.html"></iframe> </p>
<div class="hr">
<hr /></div>
<h2>Example &#8211; How to validate with a javascript function</h2>
<p>In this example validates the input field &#8216;#inputPasswordVerification&#8217; and see if it matches the input field &#8216;#inputPassword&#8217;. If it doesn&#8217;t match the validation message &#8216;Passwords does not match&#8217; will be shown.</p>
<pre class="brush: jscript;">
function doesPasswordFieldsMatch(values){
    if(values.password == values.verification)
        return {valid:true}
    else
        return {valid:false, message:'Passwords does not match'}
}

$('#inputPassword').valid8('Password is required');
$('#inputConfirmPassword').valid8({
    'jsFunctions': [
        { function: doesPasswordFieldsMatch, values: function(){
                return { password: $('#inputPassword').val(), verification: $('#inputConfirmPassword').val() }
            }
        }
    ]
});
</pre>
<p><iframe id="demo" style="border: 1px solid #ccc; width: 620px; height: 210px;" src="http://sandbox.unwrongest.com/forms/jquery.valid8.js.html"></iframe> </p>
<div class="hr">
<hr /></div>
<h2>Example &#8211; How to validate with an ajax request</h2>
<p>This example will post the value of the input field &#8216;#inputEmail&#8217; to isEmailUnique.php. </p>
<pre class="brush: jscript;">
	$('#inputEmail').valid8({
	    'regularExpressions': [
	        { expression: /^[a-z0-9!#$%&amp;'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&amp;'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/, errormessage: 'Email is not valid'},
            ],
	    'ajaxRequests': [
	        { url: 'lib/isEmailUnique.php' }
	    ]
	});
</pre>
<pre class="brush: php;">
$email = $_POST['value'];

if(!isEmailUnique($email)){
	$json[&quot;valid&quot;] = false;
	$json[&quot;message&quot;] = 'Email is already in use';
}
else {
	$json[&quot;valid&quot;] = true;
}

function isEmailUnique($email){
	// Database look-up should go here here...
	// But for the sake of this demo a random return will do
	return rand(0, 1);
}

print json_encode($json);
</pre>
<p><iframe id="demo" style="border: 1px solid #ccc; width: 620px; height: 140px;" src="http://sandbox.unwrongest.com/forms/jquery.valid8.ajax.html"></iframe></p>
<div class="hr">
<hr /></div>
<table class="project-table">
<caption>Change log</caption>
<thead>
<tr>
<th class="version">Version</th>
<th class="changes">Changes</th>
</tr>
</thead>
<tbody>
<tr>
<td>1.3</td>
<td>Valid8 now uses triggers instead of callback functions</td>
</tr>
<tr>
<td>1.2.2</td>
<td>Fixed a bug related to checkbox validation</td>
</tr>
<tr>
<td>1.2.1</td>
<td>Fixed a bug in IE7</td>
</tr>
<tr>
<td>1.2</td>
<td>Faster, harder, stronger.</td>
</tr>
<tr>
<td>1.1.2</td>
<td>Fixed a spelling mistake</td>
</tr>
<tr>
<td>1.1.1</td>
<td>Fixed a bug where white-spaces would pass the default validation regexp. (Thanks to Srinivas Tamada for reporting the bug)</td>
</tr>
<tr>
<td>1.1</td>
<td>Changed the variable validationEvent to validationEvents. It can now take both strings (eg. &#8216;keyup&#8217;) and arrays with strings (eg: ['keyup','blur']).</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.unwrongest.com/projects/valid8/feed/</wfw:commentRss>
		<slash:comments>60</slash:comments>
		</item>
		<item>
		<title>Defaultvalue &#8211; Gives value to empty inputs jQuery plugin</title>
		<link>http://www.unwrongest.com/projects/defaultvalue/</link>
		<comments>http://www.unwrongest.com/projects/defaultvalue/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 04:01:33 +0000</pubDate>
		<dc:creator>Jan Jarfalk</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://unwr/?p=177</guid>
		<description><![CDATA[Defaultvalue is a Jquery plugin that sets a default value on your input elements if they are empty. The default value disappears if the input gain focus or the user types something in it. Perfect for label values like "Search here...", "Username" or example values like "john.doe@corp.com". Works with both text and password inputs as well as textareas.]]></description>
			<content:encoded><![CDATA[<h2>How to use Defaultvalue</h2>
<p>There are two ways of using Defaultvalue. The first one is the, according to w3c, pure one. The second one is in some cases the right way to go.</p>
<h3>The first way</h3>
<p>In the pure one you set the default value, the value you want to show when the input element is empty, in the javascript. For every default value you need to call the defaultValue function.</p>
<pre class="brush:html">
<input type="text" id="inputUsername" />
<input type="password" id="inputPassword" />
</pre>
<pre class="brush:javascript">
$('#inputUsername').defaultValue({'value':'Username'});
$('#inputPassword').defaultValue({'value':'Password'});
</pre>
<h3>The second way</h3>
<p>The second way of using Defaultvalue is in some cases the easiest approach, but it is not according to w3c&#8217;s recommendations. It does not validate since it makes use of the rel attribute. First off the rel attribute should be used to state a relation, secondly the input element doesn&#8217;t even have a rel attribute. But, it works&#8230; even in Internet Explorer 6.</p>
<p>You state the default value directly in the html using the inputs rel attribute. In the javascript you only need to call the defaultValue function once.</p>
<pre class="brush: xml;">
&lt;input type=&quot;text&quot; id=&quot;inputUsername&quot; rel=&quot;Username&quot; /&gt;
&lt;input type=&quot;password&quot; id=&quot;inputPassword&quot; rel=&quot;Password&quot; /&gt;
</pre>
<pre class="brush: jscript;">
$('input').defaultValue();
</pre>
<h2>Empty input fields has the class name &#8216;empty&#8217;</h2>
<p>When the default value is shown the class name &#8216;empty&#8217; is added to the field. Take a look at the <a href="http://sandbox.unwrongest.com/jquery.defaultvalue/">demo</a> and see how the default values differs from the user created values.</p>
<h2>Password fields manipulate the DOM</h2>
<p>Since you can&#8217;t change the type of an input field in Internet Explorer, Defaultvalue creates a clone of your password field but with the type text instead.</p>
<table class="project-table">
<caption>Change log</caption>
<thead>
<tr>
<th class="version">Version</th>
<th class="changes">Changes</th>
</tr>
</thead>
<tbody>
<tr>
<td>1.3.1</td>
<td>Fixed Lazy compatibility (Thanks Anders Adlén)</td>
</tr>
<tr>
<td>1.3</td>
<td>Refactored (Thanks Kristofer Karlsson)</td>
</tr>
<tr>
<td>1.2</td>
<td>Fixed an &#8216;addClass&#8217; is not a function error (Thanks pentarim)</td>
</tr>
<tr>
<td>1.1</td>
<td>Refactored. Default values are now removed when closest form is submitted. Fixed tabindex issue. (Thanks a lot to Paul Elliott)</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.unwrongest.com/projects/defaultvalue/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Airport &#8211; Information board text effect jQuery plugin</title>
		<link>http://www.unwrongest.com/projects/airport/</link>
		<comments>http://www.unwrongest.com/projects/airport/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 01:22:24 +0000</pubDate>
		<dc:creator>Jan Jarfalk</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[effect]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://unwr/?p=75</guid>
		<description><![CDATA[Airport is a rather simple text effect plugin for Jquery. It emulates the style of those flickering information boards you sometime find on airports and train stations.]]></description>
			<content:encoded><![CDATA[<p>Airport is a very, very, very simple text effect plugin for Jquery. It emulates the style of those flickering information boards you sometimes find on airports and train stations. Just watch the <a href="http://sandbox.unwrongest.com/jquery.airport/">demo</a> and you will understand</p>
<h2>How to use Airport</h2>
<p>Airtport is very easy to use. Create an element, give it an ID and throw airport on it. The values, moscow, berlin and stockholm, are the words it will flick through. </p>
<pre class="brush: html">
&lt;div id="stuff">&lt;/div>
&lt;script type="text/javascript">
    $('#stuff').airport(['moscow','berlin','stockholm']);
&lt;/script>
</pre>
<table class="project-table">
<caption>Change log</caption>
<thead>
<tr>
<th class="version">Version</th>
<th class="changes">Changes</th>
</tr>
</thead>
<tbody>
<tr>
<td>1.1</td>
<td>Defaults to hyphen, if character not found in character array.</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.unwrongest.com/projects/airport/feed/</wfw:commentRss>
		<slash:comments>52</slash:comments>
		</item>
		<item>
		<title>Lazy &#8211; The on-demand jQuery plugin loader</title>
		<link>http://www.unwrongest.com/projects/lazy/</link>
		<comments>http://www.unwrongest.com/projects/lazy/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 19:12:19 +0000</pubDate>
		<dc:creator>Jan Jarfalk</dc:creator>
				<category><![CDATA[projects]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://b.unwrongest.com/?p=209</guid>
		<description><![CDATA[This Jquery plugin is an on-demand plugin loader, also known as a lazy loader. Instead of downloading all Jquery-plugins, you might or might not need, when the page loads. Lazy downloads the plugins when you actually use them.]]></description>
			<content:encoded><![CDATA[<p>This Jquery plugin is an on-demand Jquery plugin loader, also known as a lazy loader. Instead of downloading all Jquery-plugins, you might or might not need, when the page loads. Lazy downloads the plugins when you actually use them. Lazy is very lightweight, super fast, and smart. Lazy will keep track of all your plugins and dependencies and make sure that they are only downloaded once.</p>
<h2>How to use Lazy</h2>
<pre class="brush: jscript;">
$.lazy({
	src: 'jquery.elastic.js',
	name: 'elastic'
});

// And then you use you plugins as you always do
$('textarea').elastic();</pre>
<h2>How to work with dependencies</h2>
<pre class="brush: jscript;">
$.lazy({
	src: 'ui.draggable.js',
	name: 'draggable',
	dependencies: {
		js: ['ui.core.js'],
		css: ['ui.draggable.css']
	}
});

// And then you use you plugins as you always do
$(&quot;#draggable&quot;).draggable();
</pre>
<p>This will load ui.draggable.css and ui.core.js before it loads ui.draggable.js and applies it on the element draggable.</p>
<h2>Enable or disable caching</h2>
<pre class="brush: jscript;">
$.lazy({
	src: 'ui.draggable.js',
	name: 'draggable',
	dependencies: {
		js: ['ui.core.js'],
		css: ['ui.draggable.css']
	},
	cache: true
});
</pre>
<p>Caching is disabled by default, but you can enable it by setting the variable cache to true.</p>
<table class="project-table">
<caption>Change log</caption>
<thead>
<tr>
<th class="version">Version</th>
<th class="changes">Changes</th>
</tr>
</thead>
<tbody>
<tr>
<td>1.5</td>
<td>Refactored. (Thanks Kristofer Karlsson)</td>
</tr>
<tr>
<td>1.3.1</td>
<td>Critical bug fix for argument leakage.</td>
</tr>
<tr>
<td>1.3</td>
<td>Faster, better and stronger. Added cache control and a new API</td>
</tr>
<tr>
<td>1.2.2</td>
<td>Fixed a bug where Lazy would load the same plugin more than once.</td>
</tr>
<tr>
<td>1.2</td>
<td>Added support for jquery&#8217;s chainability</td>
</tr>
<tr>
<td>1.1</td>
<td>Added support for css and javascript dependencies</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.unwrongest.com/projects/lazy/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
	</channel>
</rss>
