<?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>dragffy.com &#187; jQuery</title>
	<atom:link href="http://dragffy.com/blog/posts/category/programming/javascript-programming/jquery-javascript-programming-programming/feed" rel="self" type="application/rss+xml" />
	<link>http://dragffy.com/blog</link>
	<description>The development, documentation, and blogging domain of Gabriel Dragffy.</description>
	<lastBuildDate>Sun, 29 Apr 2012 11:55:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>IE doesn&#8217;t recognise &#8220;select option&#8221;.click()</title>
		<link>http://dragffy.com/blog/posts/ie-doesnt-recognise-select-optionclick</link>
		<comments>http://dragffy.com/blog/posts/ie-doesnt-recognise-select-optionclick#comments</comments>
		<pubDate>Fri, 14 Nov 2008 14:30:14 +0000</pubDate>
		<dc:creator>Gabe</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://dragffy.com/blog/?p=65</guid>
		<description><![CDATA[Instead of: $(&#8216;#ranges option&#8217;).click(function() { var val = $(this).val(); //do something with val }); Had to change it to: $(&#8216;#ranges&#8217;).change(function() { var val = $(this).val(); //do something with val });]]></description>
			<content:encoded><![CDATA[<p>Instead of:<br />
        $(&#8216;#ranges option&#8217;).click(function() {<br />
            var val = $(this).val();<br />
            //do something with val<br />
        });</p>
<p>Had to change it to:<br />
        $(&#8216;#ranges&#8217;).change(function() {<br />
            var val = $(this).val();<br />
            //do something with val<br />
        });</p>
]]></content:encoded>
			<wfw:commentRss>http://dragffy.com/blog/posts/ie-doesnt-recognise-select-optionclick/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using jQuery to make a login form more sleek</title>
		<link>http://dragffy.com/blog/posts/using-jquery-to-make-a-login-form-more-sleek</link>
		<comments>http://dragffy.com/blog/posts/using-jquery-to-make-a-login-form-more-sleek#comments</comments>
		<pubDate>Wed, 05 Mar 2008 10:50:21 +0000</pubDate>
		<dc:creator>Gabe</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[web programming]]></category>

		<guid isPermaLink="false">http://dragffy.com/blog/posts/using-jquery-to-make-a-login-form-more-sleek</guid>
		<description><![CDATA[The following code is well commented, please read the comments for a thorough understanding. &#60;script type="text/javascript" charset="utf-8"&#62; $(document).ready(function(){ // The following js code will take the standard login form and hide it's // labels. It will then change the password input type to text // (so that normal letters are // displayed in it), set [...]]]></description>
			<content:encoded><![CDATA[<p>The following code is well commented, please read the comments for a thorough understanding.<br />
<code><br />
&lt;script type="text/javascript" charset="utf-8"&gt;<br />
$(document).ready(function(){</p>
<p>	// The following js code will take the standard login form and hide it's<br />
	// labels. It will then change the password input type to text<br />
	// (so that normal letters are<br />
	// displayed in it), set the value of the email input to 'email. Set the<br />
	// value of the password input to 'password. These values server as the<br />
	// new labels.<br />
<span id="more-20"></span><br />
	// Upon clicking or tabbing to the email input the code finde the value<br />
	// of the input.<br />
	// If it is still set to 'email' we assume the user hasn't<br />
	// changed it, and remove it for convenience so the user may begin<br />
	// typing immediately.</p>
<p>	// When the password field is clicked or tabbed to the type is changed<br />
	// back from text to password, making it ready to accept the user's<br />
	// password without displaying the characters on the screen.<br />
	// Actually, the type can't be changed on-the-fly<br />
	// because IE doesn't like this, what really happens is that<br />
	// the entire password input is swapped out on page load, and then swapped<br />
	// back on focus.</p>
<p>	// Hide the labels for the inputs<br />
	$( 'form[@name="login"] &gt; label' ).hide(); </p>
<p>	// Place the word 'email' in the email input<br />
	$( '#sideBarEmail input' ).attr( "value", "email" );</p>
<p>	// Create a new form input and store it in a variable<br />
	var newInput = $('&lt;input /&gt;')<br />
					.attr( 'name', 'password' )<br />
					.attr( 'size', 15 )<br />
					.val( 'password' );</p>
<p>	// Make a copy of the password input we want to replace, and store it in<br />
	// a vavariable<br />
	var oldInput = $( '#sideBarPassword' ).clone();</p>
<p>	// So we replace the old input with the new one, this shows the word password<br />
	// by default and is of type text<br />
	$( '#sideBarPassword input' ).replaceWith( newInput );</p>
<p>	// When the user clicks or tabs to the password field we replace the text<br />
	// input with the old password field, this ensures characters are<br />
	// represented as asteriks, the cursor is placed in the input field<br />
	// for convenience<br />
	$( '#sideBarPassword' ).bind( "click select", function(){<br />
		$( this ).replaceWith( oldInput );<br />
		$( '#sideBarPassword input' ).select();<br />
	})</p>
<p>	// Clicking or tabbing to the email we check if the value is equal<br />
	// to 'email'<br />
	// if it is we delete it automatically.<br />
	$( '#sideBarEmail input' ).bind( "click select", function(){<br />
		if( this.value == 'email') {<br />
			$( this ).val( "" );<br />
		}<br />
	})<br />
})<br />
&lt;/script&gt;<br />
And the HTML that it refers to:</p>
<pre>
&lt;form name='login' method='POST'  action='/festival/Login/login_submit'&gt;
	&lt;label for="email"&gt;Email&lt;/label&gt;
	&lt;p id="sideBarEmail"&gt;&lt;input type='text' name='email' value='' size=15 /&gt;&lt;/p&gt;
	&lt;label for="password"&gt;Password&lt;/label&gt;
	&lt;p id="sideBarPassword"&gt;
		&lt;input type='password' name='password' value='' size=15 /&gt;
	&lt;/p&gt;
	&lt;p&gt;
		&lt;input type='hidden' name='login' value='1'&gt;
		&lt;input class="submit" type='image' name='Log In' value='submit'
		 src="/festival/img/08/button_signIn.gif" /&gt;
		&lt;a href="#"&gt;
			&lt;img src="/festival/img/08/button_signUp.gif" alt="Sign Up"/&gt;
		&lt;/a&gt;
	&lt;/p&gt;
&lt;/form&gt;</pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://dragffy.com/blog/posts/using-jquery-to-make-a-login-form-more-sleek/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

