<?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>blogt0sk1 &#187; jQuery</title>
	<atom:link href="http://blog.jerodsanto.net/category/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jerodsanto.net</link>
	<description>with Jerod Santo</description>
	<lastBuildDate>Sat, 19 Jun 2010 14:34:45 +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>jQuery Tools 101: Nested Tabs</title>
		<link>http://blog.jerodsanto.net/2009/07/jquery-tools-101-nested-tabs/</link>
		<comments>http://blog.jerodsanto.net/2009/07/jquery-tools-101-nested-tabs/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 22:25:43 +0000</pubDate>
		<dc:creator>Jerod</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[101]]></category>
		<category><![CDATA[jquerytools]]></category>
		<category><![CDATA[tabs]]></category>

		<guid isPermaLink="false">http://blog.jerodsanto.net/?p=494</guid>
		<description><![CDATA[jQuery Tools is the new kid on the block when it comes to jQuery-based user interface libraries. What it offers is a solid foundation of widgets at an extremely small file size (5.8 KB minified). I decided to ditch jQuery UI on a recent project when I couldn&#8217;t get tabs &#038; accordions to play nice [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://flowplayer.org/tools/index.html">jQuery Tools</a> is the new kid on the block when it comes to jQuery-based user interface libraries. What it offers is a solid foundation of widgets at an extremely small file size (5.8 KB minified).</p>
<p>I decided to ditch <a href="http://jqueryui.com">jQuery UI</a> on a recent project when I couldn&#8217;t get tabs &#038; accordions to play nice together (also, their site was down when I needed it so I took that as a sign). This was a great opportunity to try jQuery Tools and I have been very impressed thus far.</p>
<p>To use the minimal tabs interface you can simply <a href="http://flowplayer.org/tools/demos/tabs/index.html">follow the instructions on their site</a>, but if you want to nest tabs inside one another you&#8217;ll need to change things slightly. I&#8217;ll demonstrate below:<br />
<span id="more-494"></span></p>
<h3>the Mark Up</h3>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;ul class=&quot;tabs main&quot;&gt;
  &lt;li&gt;&lt;a class=&quot;main&quot; href=&quot;#1&quot;&gt;Main Tab 1&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a class=&quot;main&quot; href=&quot;#1&quot;&gt;Main Tab 2&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&nbsp;
&lt;div class=&quot;panes main&quot;&gt;
  &lt;div&gt;this is main tab 1 content. it includes another set of tabs
&nbsp;
    &lt;ul class=&quot;tabs nested&quot;&gt;
      &lt;li&gt;&lt;a class=&quot;nested&quot; href=&quot;#2&quot;&gt;Nested Tab 1&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a class=&quot;nested&quot; href=&quot;#2&quot;&gt;Nested Tab 2&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
&nbsp;
    &lt;div class=&quot;panes nested&quot;&gt;
      &lt;div&gt;this is my nested tab 1 content&lt;/div&gt;
      &lt;div&gt;this is my nested tab 2 content&lt;/div&gt;
    &lt;/div&gt;
&nbsp;
  &lt;/div&gt;
  &lt;div&gt;this is my main tab 2 content&lt;/div&gt;
&lt;/div&gt;</pre></div></div>

<p>The key in this sequence is that the seemingly arbitrary href attribute on the tab anchors has different content for the main tabs (#1) than the nested tabs (#2). This is required or your nested tabs will keep returning to the main tabs when you click on a tab link.</p>
<h3>the JavaScript</h3>
<p>To configure the nested tabs, you can define the JavaScript as simply as this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #000;">&#40;</span>document<span style="color: #000;">&#41;</span>.<span style="color: #0086B3;">ready</span><span style="color: #000;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #000;">&#40;</span><span style="color: #000;">&#41;</span> <span style="color: #000;">&#123;</span>
  $<span style="color: #000;">&#40;</span><span style="color: #D14;">&quot;ul.main.tabs&quot;</span><span style="color: #000;">&#41;</span>.<span style="color: #0086B3;">tabs</span><span style="color: #000;">&#40;</span><span style="color: #D14;">&quot;div.main.panes &gt; div&quot;</span><span style="color: #000;">,</span> <span style="color: #000;">&#123;</span>tabs<span style="color: #000;">:</span> <span style="color: #D14;">'a.main'</span><span style="color: #000;">&#125;</span><span style="color: #000;">&#41;</span><span style="color: #000;">;</span>
&nbsp;
  $<span style="color: #000;">&#40;</span><span style="color: #D14;">&quot;ul.nested.tabs&quot;</span><span style="color: #000;">&#41;</span>.<span style="color: #0086B3;">tabs</span><span style="color: #000;">&#40;</span><span style="color: #D14;">&quot;div.nested.panes &gt; div&quot;</span><span style="color: #000;">,</span> <span style="color: #000;">&#123;</span>tabs<span style="color: #000;">:</span> <span style="color: #D14;">'a.nested'</span><span style="color: #000;">&#125;</span><span style="color: #000;">&#41;</span><span style="color: #000;">;</span>
<span style="color: #000;">&#125;</span><span style="color: #000;">&#41;</span><span style="color: #000;">;</span></pre></div></div>

<p>the tabs() function is called on a jQuery selector that matches the unordered list and it takes as its first argument a selector for where to find the tab&#8217;s content panes. It&#8217;s second argument is a single option that tells tabs() which elements to use as links for the tabs. The default is &#8216;a&#8217;, but to differentiate the main tabs from the nested tabs, it needs to be passed explicitly with the correct class for the anchor.</p>
<h3>the Style</h3>
<p>Of course, to make these look cool you&#8217;ll need some nice CSS applied to the elements at play. I&#8217;ll leave that to you, but you can get a decent start from the <a href="http://flowplayer.org/tools/tabs.html">demo page</a> for the library.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jerodsanto.net/2009/07/jquery-tools-101-nested-tabs/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>jQuery &#8211; Open External Links In New Window/Tab</title>
		<link>http://blog.jerodsanto.net/2009/05/jquery-open-external-links-in-new-windowtab/</link>
		<comments>http://blog.jerodsanto.net/2009/05/jquery-open-external-links-in-new-windowtab/#comments</comments>
		<pubDate>Tue, 19 May 2009 02:26:47 +0000</pubDate>
		<dc:creator>Jerod</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[quickies]]></category>

		<guid isPermaLink="false">http://blog.jerodsanto.net/?p=361</guid>
		<description><![CDATA[The common technique to force links to open a new window or tab is to add a &#8220;target&#8221; attribute like so: &#60;a href=&#34;http://hulu.com&#34; target=&#34;_blank&#34;&#62;check it out&#60;/a&#62; This works just fine but is not actually valid markup. Fortunately, we can use jQuery to add the target attribute so it doesn&#8217;t muck up the HTML. $&#40;document&#41;.ready&#40;function&#40;&#41; &#123; [...]]]></description>
			<content:encoded><![CDATA[<p>The common technique to force links to open a new window or tab is to add a <strong>&#8220;target&#8221;</strong> attribute like so:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;a href=&quot;http://hulu.com&quot; target=&quot;_blank&quot;&gt;check it out&lt;/a&gt;</pre></div></div>

<p>This works just fine but is not actually valid markup. Fortunately, we can use jQuery to add the target attribute so it doesn&#8217;t muck up the HTML.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #000;">&#40;</span>document<span style="color: #000;">&#41;</span>.<span style="color: #0086B3;">ready</span><span style="color: #000;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #000;">&#40;</span><span style="color: #000;">&#41;</span> <span style="color: #000;">&#123;</span>
  $<span style="color: #000;">&#40;</span><span style="color: #D14;">'a[rel=&quot;external&quot;]'</span><span style="color: #000;">&#41;</span>.<span style="color: #0086B3;">click</span><span style="color: #000;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #000;">&#40;</span><span style="color: #000;">&#41;</span><span style="color: #000;">&#123;</span>
    $<span style="color: #000;">&#40;</span><span style="color: #000; font-weight: bold;">this</span><span style="color: #000;">&#41;</span>.<span style="color: #0086B3;">attr</span><span style="color: #000;">&#40;</span><span style="color: #D14;">'target'</span><span style="color: #000;">,</span><span style="color: #D14;">'_blank'</span><span style="color: #000;">&#41;</span><span style="color: #000;">;</span>
  <span style="color: #000;">&#125;</span><span style="color: #000;">&#41;</span><span style="color: #000;">;</span>
<span style="color: #000;">&#125;</span><span style="color: #000;">&#41;</span><span style="color: #000;">;</span></pre></div></div>

<p>Change that invalid link to look like this instead:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;a href=&quot;http://hulu.com&quot; rel=&quot;external&quot;&gt;check it out&lt;/a&gt;</pre></div></div>

<p>Now the link forces browsers to open a new window/tab and the markup is still valid. Easy cheesy.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jerodsanto.net/2009/05/jquery-open-external-links-in-new-windowtab/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>jQuery &#8211; Set Mouse Focus On Page Load</title>
		<link>http://blog.jerodsanto.net/2009/05/jquery-set-mouse-focus-on-page-load/</link>
		<comments>http://blog.jerodsanto.net/2009/05/jquery-set-mouse-focus-on-page-load/#comments</comments>
		<pubDate>Sun, 10 May 2009 00:49:02 +0000</pubDate>
		<dc:creator>Jerod</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[quickies]]></category>

		<guid isPermaLink="false">http://blog.jerodsanto.net/?p=276</guid>
		<description><![CDATA[First Input: $&#40;document&#41;.ready&#40;function&#40;&#41; &#123; $&#40;'input:text:first'&#41;.focus&#40;&#41;; &#125;&#41;; First Empty Input: $&#40;document&#41;.ready&#40;function&#40;&#41; &#123; $&#40;'input:text[value=&#34;&#34;]:first'&#41;.focus&#40;&#41;; &#125;&#41;;]]></description>
			<content:encoded><![CDATA[<h3>First Input:</h3>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #000;">&#40;</span>document<span style="color: #000;">&#41;</span>.<span style="color: #0086B3;">ready</span><span style="color: #000;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #000;">&#40;</span><span style="color: #000;">&#41;</span> <span style="color: #000;">&#123;</span>
  $<span style="color: #000;">&#40;</span><span style="color: #D14;">'input:text:first'</span><span style="color: #000;">&#41;</span>.<span style="color: #0086B3;">focus</span><span style="color: #000;">&#40;</span><span style="color: #000;">&#41;</span><span style="color: #000;">;</span>
<span style="color: #000;">&#125;</span><span style="color: #000;">&#41;</span><span style="color: #000;">;</span></pre></div></div>

<h3>First Empty Input:</h3>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #000;">&#40;</span>document<span style="color: #000;">&#41;</span>.<span style="color: #0086B3;">ready</span><span style="color: #000;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #000;">&#40;</span><span style="color: #000;">&#41;</span> <span style="color: #000;">&#123;</span>
  $<span style="color: #000;">&#40;</span><span style="color: #D14;">'input:text[value=&quot;&quot;]:first'</span><span style="color: #000;">&#41;</span>.<span style="color: #0086B3;">focus</span><span style="color: #000;">&#40;</span><span style="color: #000;">&#41;</span><span style="color: #000;">;</span>
<span style="color: #000;">&#125;</span><span style="color: #000;">&#41;</span><span style="color: #000;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.jerodsanto.net/2009/05/jquery-set-mouse-focus-on-page-load/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Great jQuery Reference</title>
		<link>http://blog.jerodsanto.net/2008/08/great-jquery-reference/</link>
		<comments>http://blog.jerodsanto.net/2008/08/great-jquery-reference/#comments</comments>
		<pubDate>Thu, 14 Aug 2008 20:16:00 +0000</pubDate>
		<dc:creator>Jerod</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[linkage]]></category>

		<guid isPermaLink="false">http://0/2008/08/14/great-jquery-reference</guid>
		<description><![CDATA[I don&#8217;t usually post links on this blog unless they accompany a tutorial, but this reference is so good I can&#8217;t help but throw it up here for others. Yes, I am linking to a list of links. How meta of me If you are writing any jQuery whatsoever and want to polish your skills, [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t usually post links on this blog unless they accompany a tutorial, but this reference is so good I can&#8217;t help but throw it up here for others. Yes, I am linking to a list of links. How meta of me <img src='http://blog.jerodsanto.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>If you are writing any <a href="http://jquery.com/">jQuery</a> whatsoever and want to polish your skills, check this:</p>
<p><a href="http://effectize.com/jquery-developer-guide">The Complete Guide For you to Become an Almighty jQuery Developer</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jerodsanto.net/2008/08/great-jquery-reference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Wizard Redux</title>
		<link>http://blog.jerodsanto.net/2008/08/jquery-wizard-redux/</link>
		<comments>http://blog.jerodsanto.net/2008/08/jquery-wizard-redux/#comments</comments>
		<pubDate>Sun, 10 Aug 2008 05:17:00 +0000</pubDate>
		<dc:creator>Jerod</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[refactor]]></category>
		<category><![CDATA[wizard]]></category>

		<guid isPermaLink="false">http://0/2008/08/09/jquery-wizard-redux</guid>
		<description><![CDATA[I was interested in creating a step-by-step form wizard for a Rails app I&#8217;ve been working on, so naturally I began searching for a jQuery plugin or tutorial. The best thing I could find was a &#8216;plugin&#8217; written back in June of 2007 on this blog. The demo was quite attractive so I immediately began [...]]]></description>
			<content:encoded><![CDATA[<p>I was interested in creating a step-by-step form wizard for a Rails app I&#8217;ve been working on, so naturally I began searching for a jQuery plugin or tutorial. The best thing I could find was a &#8216;plugin&#8217; written back in June of 2007 on <a href="http://worcesterwideweb.com/2007/06/04/jquery-wizard-plugin/">this blog</a>.</p>
<p>The <a href="http://worcesterwideweb.com/jquery/wizard/">demo</a> was quite attractive so I immediately began trying to work this implementation into my app. Upon reviewing the source code, I became a little less excited because the markup and styling left a lot to be desired. So instead of just complaining about it in the comments of the blog post (as had become my unfortunate custom), I figured I&#8217;d just re-write the thang until I was happy with it.</p>
<p>A few of my redesign goals:</p>
<ul>
<li>Eliminate redundant step titles and descriptions</li>
<li>Remove unneeded styles from <a href="http://codylindley.com/CSS/325/css-step-menu">Cody Lindley&#8217;s CSS step menu</a></li>
<li>More jQuery, less HTML</li>
<li>Use valid markup</li>
<li>Reduce LOC dramatically</li>
<li>Comment code well to increase learning/understanding potential</li>
</ul>
<p>So How&#8217;d it turn out? I validated the markup, removed all redundancy, reduced the HTML required from 84 to 21 LOC, the CSS from 191 to 108, and made the JavaScript unobtrusive. As far as the commenting and quality of the JavaScript used, I&#8217;ll leave that for you to judge.</p>
<p>To see the wizard in action, follow <a href="http://jerodsanto.net/src/wizard/demo/">this link</a>.<br />
You can also download all the source files as a <a href="http://jerodsanto.net/src/wizard/wizard.zip">zip</a> or <a href="http://jerodsanto.net/src/wizard/wizard.tgz">tarball</a>.</p>
<p>Feel free to give suggestions in the comments section. Or do as I did and modify my version to make it even better!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jerodsanto.net/2008/08/jquery-wizard-redux/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
