<?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: Setting your tabindex on your html forms automatically with jQuery</title>
	<atom:link href="http://greatwebguy.com/programming/dom/setting-your-tabindex-on-your-html-forms-automatically-with-jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://greatwebguy.com/programming/dom/setting-your-tabindex-on-your-html-forms-automatically-with-jquery/</link>
	<description>Self-proclaimed greatness is a hard thing to prove.</description>
	<lastBuildDate>Mon, 06 Sep 2010 19:04:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: srage</title>
		<link>http://greatwebguy.com/programming/dom/setting-your-tabindex-on-your-html-forms-automatically-with-jquery/comment-page-1/#comment-1369</link>
		<dc:creator>srage</dc:creator>
		<pubDate>Fri, 27 Aug 2010 01:21:01 +0000</pubDate>
		<guid isPermaLink="false">http://greatwebguy.com/?p=100#comment-1369</guid>
		<description>according to the jQuery docs &quot;The :input selector basically selects all form controls.&quot;

so it&#039;s as easy as $(&#039;:input:visible&#039;).each(i,e){ $(e).attr(&#039;tabindex&#039;, i) });</description>
		<content:encoded><![CDATA[<p>according to the jQuery docs &#8220;The :input selector basically selects all form controls.&#8221;</p>
<p>so it&#8217;s as easy as $(&#8216;:input:visible&#8217;).each(i,e){ $(e).attr(&#8216;tabindex&#8217;, i) });</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hilton Gonçalves</title>
		<link>http://greatwebguy.com/programming/dom/setting-your-tabindex-on-your-html-forms-automatically-with-jquery/comment-page-1/#comment-1328</link>
		<dc:creator>Hilton Gonçalves</dc:creator>
		<pubDate>Tue, 25 May 2010 16:35:52 +0000</pubDate>
		<guid isPermaLink="false">http://greatwebguy.com/?p=100#comment-1328</guid>
		<description>$(&#039;:input[type=text]:visible, :input[type=submit]:visible, :input[type=reset]:visible, :radio:visible, :checkbox:visible, select:visible, textarea:visible&#039;)
    .each(function(i){ $(this).attr(&#039;tabindex&#039;,i+1) });</description>
		<content:encoded><![CDATA[<p>$(&#8216;:input[type=text]:visible, :input[type=submit]:visible, :input[type=reset]:visible, :radio:visible, :checkbox:visible, select:visible, textarea:visible&#8217;)<br />
    .each(function(i){ $(this).attr(&#8216;tabindex&#8217;,i+1) });</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ole Marius Løset</title>
		<link>http://greatwebguy.com/programming/dom/setting-your-tabindex-on-your-html-forms-automatically-with-jquery/comment-page-1/#comment-1286</link>
		<dc:creator>Ole Marius Løset</dc:creator>
		<pubDate>Thu, 18 Mar 2010 05:48:18 +0000</pubDate>
		<guid isPermaLink="false">http://greatwebguy.com/?p=100#comment-1286</guid>
		<description>This would probably not happen in many cases, but when I used this for the sign-in form on my website, I got an error from the input type password. 

I solved it like this: 

$j(document).ready(function() {
	var tabindex = 0; // FYI: Tabindexes starts with 0.
	$j(&quot;:input[type=text]:visible :radio:visible, :checkbox:visible&quot;).each(function(i,e){ 
		$j(e).attr(&#039;tabindex&#039;,i) ;
	});
});</description>
		<content:encoded><![CDATA[<p>This would probably not happen in many cases, but when I used this for the sign-in form on my website, I got an error from the input type password. </p>
<p>I solved it like this: </p>
<p>$j(document).ready(function() {<br />
	var tabindex = 0; // FYI: Tabindexes starts with 0.<br />
	$j(&#8220;:input[type=text]:visible :radio:visible, :checkbox:visible&#8221;).each(function(i,e){<br />
		$j(e).attr(&#8216;tabindex&#8217;,i) ;<br />
	});<br />
});</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cypp</title>
		<link>http://greatwebguy.com/programming/dom/setting-your-tabindex-on-your-html-forms-automatically-with-jquery/comment-page-1/#comment-1169</link>
		<dc:creator>cypp</dc:creator>
		<pubDate>Fri, 27 Nov 2009 10:43:34 +0000</pubDate>
		<guid isPermaLink="false">http://greatwebguy.com/?p=100#comment-1169</guid>
		<description>@Fellipe Cicconi , $(’:enabled:visible’).each(function(i,e){ $(e).attr(’tabindex’,i) }); —-&gt; this put tabindex to br ,span , div tags</description>
		<content:encoded><![CDATA[<p>@Fellipe Cicconi , $(’:enabled:visible’).each(function(i,e){ $(e).attr(’tabindex’,i) }); —-&gt; this put tabindex to br ,span , div tags</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fellipe Cicconi</title>
		<link>http://greatwebguy.com/programming/dom/setting-your-tabindex-on-your-html-forms-automatically-with-jquery/comment-page-1/#comment-1119</link>
		<dc:creator>Fellipe Cicconi</dc:creator>
		<pubDate>Wed, 12 Aug 2009 00:30:46 +0000</pubDate>
		<guid isPermaLink="false">http://greatwebguy.com/?p=100#comment-1119</guid>
		<description>[UPDATE 2]

$(&#039;:enabled:visible&#039;).each(function(i,e){ $(e).attr(&#039;tabindex&#039;,i) });</description>
		<content:encoded><![CDATA[<p>[UPDATE 2]</p>
<p>$(&#8216;:enabled:visible&#8217;).each(function(i,e){ $(e).attr(&#8216;tabindex&#8217;,i) });</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fellipe Cicconi</title>
		<link>http://greatwebguy.com/programming/dom/setting-your-tabindex-on-your-html-forms-automatically-with-jquery/comment-page-1/#comment-1117</link>
		<dc:creator>Fellipe Cicconi</dc:creator>
		<pubDate>Wed, 12 Aug 2009 00:26:53 +0000</pubDate>
		<guid isPermaLink="false">http://greatwebguy.com/?p=100#comment-1117</guid>
		<description>[UPDATE]

// all needed visible elements at once in one line

$(&#039;:input:visible, :radio:visible, :checkbox:visible&#039;).each(function(i,e){ e.attr(&#039;tabindex&#039;,i) });

// &#039;:input&#039; - selects all input, textarea, select and buttons
// &#039;:radio&#039; - selects all radios
// &#039;:checkbox&#039; - selects all checks
// &#039;:visible&#039; - selects only visible elements

source: http://docs.jquery.com/Selectors</description>
		<content:encoded><![CDATA[<p>[UPDATE]</p>
<p>// all needed visible elements at once in one line</p>
<p>$(&#8216;:input:visible, :radio:visible, :checkbox:visible&#8217;).each(function(i,e){ e.attr(&#8216;tabindex&#8217;,i) });</p>
<p>// &#8216;:input&#8217; &#8211; selects all input, textarea, select and buttons<br />
// &#8216;:radio&#8217; &#8211; selects all radios<br />
// &#8216;:checkbox&#8217; &#8211; selects all checks<br />
// &#8216;:visible&#8217; &#8211; selects only visible elements</p>
<p>source: <a href="http://docs.jquery.com/Selectors" rel="nofollow">http://docs.jquery.com/Selectors</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fellipe Cicconi</title>
		<link>http://greatwebguy.com/programming/dom/setting-your-tabindex-on-your-html-forms-automatically-with-jquery/comment-page-1/#comment-1116</link>
		<dc:creator>Fellipe Cicconi</dc:creator>
		<pubDate>Wed, 12 Aug 2009 00:18:54 +0000</pubDate>
		<guid isPermaLink="false">http://greatwebguy.com/?p=100#comment-1116</guid>
		<description>$(&#039;input,select&#039;).each(function(i,e){ e.attr(&#039;tabindex&#039;,i) });

=)</description>
		<content:encoded><![CDATA[<p>$(&#8216;input,select&#8217;).each(function(i,e){ e.attr(&#8216;tabindex&#8217;,i) });</p>
<p>=)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shailesh</title>
		<link>http://greatwebguy.com/programming/dom/setting-your-tabindex-on-your-html-forms-automatically-with-jquery/comment-page-1/#comment-1103</link>
		<dc:creator>Shailesh</dc:creator>
		<pubDate>Sun, 12 Jul 2009 18:04:24 +0000</pubDate>
		<guid isPermaLink="false">http://greatwebguy.com/?p=100#comment-1103</guid>
		<description>This is what I was able to get working (the quotes in the Alon&#039;s comment got changed to the non-ascii chars):

$(document).ready(function(){
	$(&#039;form&#039;).each(function() {
		var tabindex = 1;

		$(&#039;input,select,textarea&#039;).each(function() {
			var $input = $(this);
			if ($input.is(&#039;:visible&#039;)) {
				$input.attr(&quot;tabindex&quot;, tabindex);
				tabindex++;
			}
		});
	});
});//document.ready</description>
		<content:encoded><![CDATA[<p>This is what I was able to get working (the quotes in the Alon&#8217;s comment got changed to the non-ascii chars):</p>
<p>$(document).ready(function(){<br />
	$(&#8216;form&#8217;).each(function() {<br />
		var tabindex = 1;</p>
<p>		$(&#8216;input,select,textarea&#8217;).each(function() {<br />
			var $input = $(this);<br />
			if ($input.is(&#8216;:visible&#8217;)) {<br />
				$input.attr(&#8220;tabindex&#8221;, tabindex);<br />
				tabindex++;<br />
			}<br />
		});<br />
	});<br />
});//document.ready</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alon</title>
		<link>http://greatwebguy.com/programming/dom/setting-your-tabindex-on-your-html-forms-automatically-with-jquery/comment-page-1/#comment-1102</link>
		<dc:creator>Alon</dc:creator>
		<pubDate>Fri, 10 Jul 2009 20:10:20 +0000</pubDate>
		<guid isPermaLink="false">http://greatwebguy.com/?p=100#comment-1102</guid>
		<description>This makes it more usable I think ... it finds textarea tags, and it will not tabindex anything that is not visible (including hidden items, or just items inside divs that are hidden etc).

function reassignTabOrders(){
   var tabindex = 1;  
   $(&#039;input,select,textarea&#039;).each(function() {  
   var $input = $(this);
   if ($input.is(&#039;:visible&#039;)) {   
      $input.attr(&quot;tabindex&quot;, tabindex);  
      tabindex++;  
   }
 });  
}</description>
		<content:encoded><![CDATA[<p>This makes it more usable I think &#8230; it finds textarea tags, and it will not tabindex anything that is not visible (including hidden items, or just items inside divs that are hidden etc).</p>
<p>function reassignTabOrders(){<br />
   var tabindex = 1;<br />
   $(&#8216;input,select,textarea&#8217;).each(function() {<br />
   var $input = $(this);<br />
   if ($input.is(&#8216;:visible&#8217;)) {<br />
      $input.attr(&#8220;tabindex&#8221;, tabindex);<br />
      tabindex++;<br />
   }<br />
 });<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dirk-Jan de Groot</title>
		<link>http://greatwebguy.com/programming/dom/setting-your-tabindex-on-your-html-forms-automatically-with-jquery/comment-page-1/#comment-972</link>
		<dc:creator>Dirk-Jan de Groot</dc:creator>
		<pubDate>Sat, 28 Mar 2009 13:07:20 +0000</pubDate>
		<guid isPermaLink="false">http://greatwebguy.com/?p=100#comment-972</guid>
		<description>i think you could you simplify this to:

var tabindex = 1;   

$(&quot;form input&quot;).not(&#039;input[type=hidden]&#039;).each(function() {   
 $(this).attr(&quot;tabindex&quot;, tabindex);   
   tabindex++;   
});   

However, it doesn&#039;t seem to work really reliably to add tabindex through the DOM.</description>
		<content:encoded><![CDATA[<p>i think you could you simplify this to:</p>
<p>var tabindex = 1;   </p>
<p>$(&#8220;form input&#8221;).not(&#8216;input[type=hidden]&#8216;).each(function() {<br />
 $(this).attr(&#8220;tabindex&#8221;, tabindex);<br />
   tabindex++;<br />
});   </p>
<p>However, it doesn&#8217;t seem to work really reliably to add tabindex through the DOM.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
