<?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>Kolodvor &#187; selectors</title>
	<atom:link href="http://www.kolodvor.net/tag/selectors/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kolodvor.net</link>
	<description>ruby, rails, javascript, jquery, ...</description>
	<lastBuildDate>Mon, 16 Jan 2012 15:24:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Set focus on first field with Prototype</title>
		<link>http://www.kolodvor.net/2010/01/02/set-focus-on-first-field-with-prototype/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=set-focus-on-first-field-with-prototype</link>
		<comments>http://www.kolodvor.net/2010/01/02/set-focus-on-first-field-with-prototype/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 14:32:02 +0000</pubDate>
		<dc:creator>vlado</dc:creator>
				<category><![CDATA[Prototype]]></category>
		<category><![CDATA[focus]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[selectors]]></category>

		<guid isPermaLink="false">http://kolodvor.net/?p=91</guid>
		<description><![CDATA[If you are using jQuery see this post. To set focus on first text field with Prototype I prefer something like this var firstField = $$('input:text:visible').first(); if (firstField) firstField.focus(); but you can also try with Form.focusFirstElement or Form.findFirstElement]]></description>
			<content:encoded><![CDATA[<p>If you are using <a href="http://www.jquery.com">jQuery</a> see <a href="http://kolodvor.net/2008/01/17/set-focus-on-first-field-with-jquery">this</a> post.</p>
<p>To set focus on first text field with Prototype I prefer something like this</p>
<pre class="code">
  var firstField = $$('input:text:visible').first();
  if (firstField)
    firstField.focus();
</pre>
<p>but you can also try with <a href="http://api.prototypejs.org/dom/form.html#focusfirstelement-class_method">Form.focusFirstElement</a> or <a href="http://api.prototypejs.org/dom/form.html#findfirstelement-class_method">Form.findFirstElement</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kolodvor.net/2010/01/02/set-focus-on-first-field-with-prototype/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Set focus on first field with jQuery</title>
		<link>http://www.kolodvor.net/2008/01/17/set-focus-on-first-field-with-jquery/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=set-focus-on-first-field-with-jquery</link>
		<comments>http://www.kolodvor.net/2008/01/17/set-focus-on-first-field-with-jquery/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 17:50:41 +0000</pubDate>
		<dc:creator>vlado</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[focus]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[selectors]]></category>

		<guid isPermaLink="false">http://kolodvor.net/2008/01/17/set-focus-on-first-field-with-jquery/</guid>
		<description><![CDATA[f you are using Prototype see this post. Setting focus on the first text field with jQuery is as simple as $("input:text:first").focus(); $("input:text:visible:first").focus(); Find more at http://docs.jquery.com/Selectors Update: If you are on Rails you can use auto_focusable_forms, dependency free plugin &#8230; <a href="http://www.kolodvor.net/2008/01/17/set-focus-on-first-field-with-jquery/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>f you are using <a href="http://www.prototype.org">Prototype</a> see <a href="http://kolodvor.net/2010/01/02/set-focus-on-first-field-with-prototype">this</a> post.</p>
<p>Setting focus on the first text field with <a href="http://www.jquery.com">jQuery</a> is as simple as</p>
<pre class="code">
  <span style="text-decoration:line-through">$("input:text:first").focus();</span>
  $("input:text:visible:first").focus();
</pre>
<p>Find more at <a href="http://docs.jquery.com/Selectors">http://docs.jquery.com/Selectors</a></p>
<p><strong>Update</strong>: If you are on <a href="http://rubyonrails.org">Rails</a> you can use <a href="http://github.com/dcadenas/auto_focusable_forms/tree/master">auto_focusable_forms</a>, dependency free plugin that will focus first input for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kolodvor.net/2008/01/17/set-focus-on-first-field-with-jquery/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>

