<?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>BBQIguana &#187; CSS</title>
	<atom:link href="http://www.bbqiguana.com/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bbqiguana.com</link>
	<description></description>
	<lastBuildDate>Fri, 23 Jul 2010 14:41:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>CSS Blinker</title>
		<link>http://www.bbqiguana.com/2009/10/css-blinker/</link>
		<comments>http://www.bbqiguana.com/2009/10/css-blinker/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 19:19:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.bbqiguana.com/?p=136</guid>
		<description><![CDATA[The secret to user-friendly forms in web apps is to draw attention to errors before submitting the form, and to do so without accosting the user with irritating Javscript popups.]]></description>
			<content:encoded><![CDATA[<p>The secret to user-friendly forms in web apps is to draw attention to errors before submitting the form, and to do so without accosting the user with irritating Javscript popups.</p>
<p>After filling in half a dozen (or more) form fields and then pressing the submit button, the user has mentally moved on.  Suddenly hearing a &#8220;clunk&#8221; sound and getting a popup that says &#8220;invalid ssn&#8221; is jarring to say they least&#8230; but it also means the user must now read through all the form labels looking for something that sounds like &#8220;invalid ssn&#8221;.</p>
<p>My solution is to flash the form field drawing the user&#8217;s attention to exactly what information needs to be fixed.  And for that, I have created <a href="/js/Blinker.js">Blinker.js</a>.</p>
<p>Just include Blinker.js into your page. Then, during validation, when a field is not valid, just call Blinker:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">Blinker.<span style="color: #660066;">blink</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'element-id'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'error-classname'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Blinker uses the supplied CSS classname to do the <em>blinking</em>, so you can use any effect you want:  change the text color, change the background, underline, add a border, whatever floats your boat.  Just declare the desired style in your CSS and then use that class name in your call, along with the DOM ID of the element to flash.</p>
<p>The <em>scrollTo</em> option allows Blinker to scroll a field into the viewport if it&#8217;s not visible.  The <em>onDelay</em> and <em>offDelay</em> allow you to customize the rate of blinking, and <em>cycle</em> determines the number of times to flash.</p>
<div class="link-summarizer"><p><strong>Links in this post</strong><ul><li><a href='/js/Blinker.js'>/js/Blinker.js</a></li></ul></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.bbqiguana.com/2009/10/css-blinker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
