<?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>Kirsten Jahn on Design &#38; Life &#187; jquery</title>
	<atom:link href="http://www.kirstenjahn.com/blog/tag/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kirstenjahn.com/blog</link>
	<description>A design &#38; life blog.</description>
	<lastBuildDate>Wed, 24 Nov 2010 22:00:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Disable Submit Button Until Checkbox is Checked</title>
		<link>http://www.kirstenjahn.com/blog/2010/01/disable-sumit-button-until-checkbox-is-checked/</link>
		<comments>http://www.kirstenjahn.com/blog/2010/01/disable-sumit-button-until-checkbox-is-checked/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 19:06:35 +0000</pubDate>
		<dc:creator>Kirsten</dc:creator>
				<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[checkbox]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[submit]]></category>

		<guid isPermaLink="false">http://www.kirstenjahn.com/blog/?p=206</guid>
		<description><![CDATA[Here&#8217;s an interesting tidbit of code I worked out today for a client website: $(document).ready(function() { $('input.button').attr('disabled', true); $('input.button').attr('value', 'Please accept our terms to submit'); $('.accept input').bind('click', function() { if ($('.accept input').is(':checked') == true) { $('input.button').removeAttr('disabled'); $('input.button').attr('value', 'Send Memory'); } &#8230; <a href="http://www.kirstenjahn.com/blog/2010/01/disable-sumit-button-until-checkbox-is-checked/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an interesting tidbit of code I worked out today for a client website:</p>
<p><code class="js">$(document).ready(function() {<br />
$('input.button').attr('disabled', true);<br />
$('input.button').attr('value', 'Please accept our terms to submit');<br />
$('.accept input').bind('click', function() {<br />
if ($('.accept input').is(':checked') == true) {<br />
$('input.button').removeAttr('disabled');<br />
$('input.button').attr('value', 'Send Memory');<br />
} else {<br />
$('input.button').attr('disabled', true);<br />
$('input.button').attr('value', 'Please accept our terms to submit');<br />
}<br />
});<br />
});</code></p>
<p>It&#8217;s JQuery for disabling a submit button until a checkbox is checked. In addition, as an added usability feature, the button says &#8220;Please accept our terms to submit&#8221; so that the user knows why the button isn&#8217;t able to be clicked.</p>
<p>In this example &#8220;button&#8221; is the class of my button and my terms checkbox is wrapped in a span with a class of &#8220;accept&#8221; (had to work around ASP.NET here at work thank you).</p>
<p>This post will most definitely be useful if I ever look for this functionality again!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kirstenjahn.com/blog/2010/01/disable-sumit-button-until-checkbox-is-checked/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Basics</title>
		<link>http://www.kirstenjahn.com/blog/2009/10/the-basics/</link>
		<comments>http://www.kirstenjahn.com/blog/2009/10/the-basics/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 20:27:45 +0000</pubDate>
		<dc:creator>Kirsten</dc:creator>
				<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[favicon]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[stylesheet]]></category>

		<guid isPermaLink="false">http://www.kirstenjahn.com/rants/?p=99</guid>
		<description><![CDATA[A large part of this blog is to be a helpful resource for me as a web designer and front-end programmer. How so? Because every time I wrangle an entire day of anguish over a silly coding problem I intend &#8230; <a href="http://www.kirstenjahn.com/blog/2009/10/the-basics/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A large part of this blog is to be a helpful resource for me as a web designer and front-end programmer. How so? Because every time I wrangle an entire day of anguish over a silly coding problem I intend to post it here. That way I will have my very own resource to look back at! And maybe, just maybe, along the way, it will be helpful to <strong>you</strong> too!</p>
<p>Let&#8217;s start with the basics in my file here at work:</p>
<p><em>To link to a stylesheet:</em><br />
<code class="html">&lt;link href="PATHTOFILE.css" type="text/css" rel="stylesheet" media="MEDIA" /&gt;</code></p>
<p>&#8220;PATHTOFILE.css&#8221; is obviously the path to your CSS file, whether relative or absolute. &#8220;MEDIA&#8221; is what type of media your stylesheet addresses. Options include &#8220;screen&#8221; for viewing on a normal computer, &#8220;print&#8221; for when a user prints out your web site, and &#8220;handheld&#8221; for viewing on a mobile device.</p>
<p><em>To link to a javascript file:</em><br />
<code class="html">&lt;script src="PATHTOFILE.js" language="javascript" type="text/javascript"&gt;&lt;/script&gt;</code></p>
<p>&#8220;PATHTOFILE.js&#8221; is the path to your Javascript file, whether relative or absolute.</p>
<p><em>To link to a favicon:</em><br />
<code class="html">&lt;link href="PATHTOFILE.ico" rel="shortcut icon"/&gt;</code></p>
<p>&#8220;PATHTOFILE.ico&#8221; is the path to your favicon file, whether relative or absolute.</p>
<p><em>A JQuery ready command:</em><br />
<code class="js">$(document).ready(function(){<br />
});</code></p>
<p>This is the most basic JQuery command in which you stuff all other JQuery code into. It basically says &#8220;don&#8217;t run any of the code in here until the page is fully loaded, or &#8216;ready&#8217;.&#8221;</p>
<p>We&#8217;ll get more complex later, I <strong>promise</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kirstenjahn.com/blog/2009/10/the-basics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

