<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Simple jQuery placeholder script for input fields</title>
	<atom:link href="http://www.iliadraznin.com/2010/03/simple-jquery-placeholder-script-input-fields/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.iliadraznin.com/2010/03/simple-jquery-placeholder-script-input-fields/</link>
	<description>Web Developer, Designer and Enthusiast</description>
	<lastBuildDate>Wed, 25 Jan 2012 17:01:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Marc Görtz</title>
		<link>http://www.iliadraznin.com/2010/03/simple-jquery-placeholder-script-input-fields/#comment-442</link>
		<dc:creator>Marc Görtz</dc:creator>
		<pubDate>Mon, 08 Nov 2010 12:56:03 +0000</pubDate>
		<guid isPermaLink="false">http://iliadraznin.com/?p=166#comment-442</guid>
		<description>You may want to take a look at my Placeholder Placebo jQuery script at Github: https://gist.github.com/373672

It tests for native placeholder support and extends jQuery’s $.support method. It also checks if the input element is focused while the page gets reloaded or an Ajax request is performed.</description>
		<content:encoded><![CDATA[<p>You may want to take a look at my Placeholder Placebo jQuery script at Github: <a href="https://gist.github.com/373672" rel="nofollow">https://gist.github.com/373672</a></p>
<p>It tests for native placeholder support and extends jQuery’s $.support method. It also checks if the input element is focused while the page gets reloaded or an Ajax request is performed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Designing Search Boxes with HTML5 and CSS3 - Azadcreative.com</title>
		<link>http://www.iliadraznin.com/2010/03/simple-jquery-placeholder-script-input-fields/#comment-440</link>
		<dc:creator>Designing Search Boxes with HTML5 and CSS3 - Azadcreative.com</dc:creator>
		<pubDate>Fri, 05 Nov 2010 16:15:46 +0000</pubDate>
		<guid isPermaLink="false">http://iliadraznin.com/?p=166#comment-440</guid>
		<description>[...] Mark Pilgrim&#8217;s Dive into HTML5 covers every base in complete detail. [&#8617;]Thanks to Ilia Draznin [...]</description>
		<content:encoded><![CDATA[<p>[…] Mark Pilgrim’s Dive into HTML5 covers every base in complete detail. [↩]Thanks to Ilia Draznin […]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gren</title>
		<link>http://www.iliadraznin.com/2010/03/simple-jquery-placeholder-script-input-fields/#comment-318</link>
		<dc:creator>gren</dc:creator>
		<pubDate>Thu, 22 Apr 2010 08:54:07 +0000</pubDate>
		<guid isPermaLink="false">http://iliadraznin.com/?p=166#comment-318</guid>
		<description>Thanks for the script, really useful.

the test 
if ($.browser.webkit) return false;
doesn&#039;t work (and $.browser is deprecated).

So, I propose another test :

if(&#039;placeholder&#039; in document.createElement(&#039;input&#039;)) return false;

It works 
-on Firefox (placeholder not implemented by ff3.6 and test evaluated to false) 
-on Chrome and Safari (placeholder implemented and test evaluated to true)
-on IE6+ (placeholder not implemented and test evaluated to false)


see also http://diveintohtml5.org/detect.html#input-placeholder

Regards,
gren</description>
		<content:encoded><![CDATA[<p>Thanks for the script, really useful.</p>
<p>the test<br />
if ($.browser.webkit) return false;<br />
doesn’t work (and $.browser is deprecated).</p>
<p>So, I propose another test :</p>
<p>if(‘placeholder’ in document.createElement(‘input’)) return false;</p>
<p>It works<br />
–on Firefox (placeholder not implemented by ff3.6 and test evaluated to false)<br />
–on Chrome and Safari (placeholder implemented and test evaluated to true)<br />
–on IE6+ (placeholder not implemented and test evaluated to false)</p>
<p>see also <a href="http://diveintohtml5.org/detect.html#input-placeholder" rel="nofollow">http://diveintohtml5.org/detect.html#input-placeholder</a></p>
<p>Regards,<br />
gren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilia</title>
		<link>http://www.iliadraznin.com/2010/03/simple-jquery-placeholder-script-input-fields/#comment-317</link>
		<dc:creator>Ilia</dc:creator>
		<pubDate>Sun, 11 Apr 2010 22:11:45 +0000</pubDate>
		<guid isPermaLink="false">http://iliadraznin.com/?p=166#comment-317</guid>
		<description>Great idea Brad, that gives me an idea for an even simpler solution.

The trouble with checking color is that now javascript depends on CSS, unless you go through the trouble of extracting the color value from the .placeholder class (granted, with jquery it&#039;s not much trouble, but more than necessary).

Instead of checking color we can simply check the class itself. If it&#039;s placeholder then we go ahead and clear the field (on focus), otherwise don&#039;t.

In fact, if we have that then the value doesn&#039;t need to be checked at all, it can be whatever, but if the user put it there then it&#039;s not going to have &quot;placeholder&quot; class and so is not cleared on focus.</description>
		<content:encoded><![CDATA[<p>Great idea Brad, that gives me an idea for an even simpler solution.</p>
<p>The trouble with checking color is that now javascript depends on CSS, unless you go through the trouble of extracting the color value from the .placeholder class (granted, with jquery it’s not much trouble, but more than necessary).</p>
<p>Instead of checking color we can simply check the class itself. If it’s placeholder then we go ahead and clear the field (on focus), otherwise don’t.</p>
<p>In fact, if we have that then the value doesn’t need to be checked at all, it can be whatever, but if the user put it there then it’s not going to have “placeholder” class and so is not cleared on focus.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brad</title>
		<link>http://www.iliadraznin.com/2010/03/simple-jquery-placeholder-script-input-fields/#comment-316</link>
		<dc:creator>Brad</dc:creator>
		<pubDate>Sun, 11 Apr 2010 21:26:21 +0000</pubDate>
		<guid isPermaLink="false">http://iliadraznin.com/?p=166#comment-316</guid>
		<description>You can also check the current color of the text to see if it needs to be erased. If it&#039;s gray, it won&#039;t be erased even if it&#039;s the same as the placeholder text.</description>
		<content:encoded><![CDATA[<p>You can also check the current color of the text to see if it needs to be erased. If it’s gray, it won’t be erased even if it’s the same as the placeholder text.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 1/12 queries in 0.007 seconds using disk: basic

Served from: www.iliadraznin.com @ 2012-02-04 17:51:47 -->
