<?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>Ounce of Talent</title>
	<atom:link href="http://ounceoftalent.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ounceoftalent.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 24 Aug 2010 21:12:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Getting Style Sheet Path</title>
		<link>http://ounceoftalent.com/2010/07/getting-style-sheet-path/</link>
		<comments>http://ounceoftalent.com/2010/07/getting-style-sheet-path/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 22:20:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://ounceoftalent.com/?p=272</guid>
		<description><![CDATA[The WordPress constant STYLESHEETPATH returns the file path to the style sheet. Example usage below:

// if 'custom/custom.php' exists, lets include our custom functions
if(file_exists(STYLESHEETPATH . '/custom/custom.php')) require_once('custom/custom.php');

]]></description>
			<content:encoded><![CDATA[<p>The WordPress constant <strong>STYLESHEETPATH</strong> returns the file path to the style sheet. Example usage below:</p>
<pre class="brush: php">
// if 'custom/custom.php' exists, lets include our custom functions
if(file_exists(STYLESHEETPATH . '/custom/custom.php')) require_once('custom/custom.php');
</pre>
]]></content:encoded>
			<wfw:commentRss>http://ounceoftalent.com/2010/07/getting-style-sheet-path/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gravity Forms Tip: Clean Confirmation Redirects</title>
		<link>http://ounceoftalent.com/2010/05/gravity-forms-tip-clean-confirmation-redirects/</link>
		<comments>http://ounceoftalent.com/2010/05/gravity-forms-tip-clean-confirmation-redirects/#comments</comments>
		<pubDate>Tue, 04 May 2010 03:09:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Gravity Forms Tip]]></category>
		<category><![CDATA[gravity forms]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://ounceoftalent.com/?p=227</guid>
		<description><![CDATA[If you&#8217;re familiar with Gravity Forms you might know that when using the confirmation redirect feature either to a page or a URL, you&#8217;ll see a very quick flicker as the form posts back to itself and then redirects you to the specified page or URL. Not a huge deal&#8230; but once you notice it, [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re familiar with Gravity Forms you might know that when using the confirmation redirect feature either to a page or a URL, you&#8217;ll see a very quick flicker as the form posts back to itself and then redirects you to the specified page or URL. Not a huge deal&#8230; but once you notice it, it&#8217;s hard to ignore. If you&#8217;ve never noticed it before&#8230; well, sorry to Shallow Hal* you, but we can make this fat chick beautiful with a surprisingly simple bit of code:</p>
<pre class="brush: php">
add_filter("gform_post_submission", "hide_form", 10, 2);
function hide_form($entry, $form) {
    if($form["confirmation"]["type"] != "message")
        echo '
<style type="text/css"> body { display: none; } </style>

';
}
</pre>
<p>So what are we doing here? Not much. We&#8217;re just using one of Gravity Forms built in filters <strong>gform_post_submission</strong> to call a custom function that we create below called <strong>hide_form</strong>. Whenever I finally understand what those last two parameters do, I&#8217;ll tell you too.</p>
<p>So the filter passes two parameters to the function which are <strong>$entry</strong> and <strong>$form</strong>. The $entry variable is an array of all the values entered into the form and the $form variable is an array of juicy information about the form itself. For our purpose, we only need the $form array. This array contains a property called &#8220;confirmation&#8221; which contains a property called &#8220;type&#8221; which contains a single value which will either be &#8220;message&#8221;, &#8220;page&#8221;, or &#8220;url&#8221;. </p>
<p>Two of these values (&#8220;page&#8221; and &#8220;url&#8221;) mean that the form is going to be redirecting to either a page or you guessed it! A URL! If the form confirmation type is set to &#8220;message&#8221;, however, the form will not be redirecting and so we want to make sure that whatever we&#8217;re going to do for the redirection confirmation types, we do not want to do for the non-redirection confirmation type. This is accomplished with a simple conditional that in reads &#8220;if the confirmation type is not &#8216;message&#8217; then run the following code&#8221;. </p>
<p>That brings us to the handy dandy style declaration that hides the body of the page so the redirect can be processed without any visual interference. That&#8217;s right. No annoying flicker when the form page begins to load and is then redirected to the actual confirmation page. Any questions?</p>
<div class="msg">PS &#8211; Sorry for the lack of a comments section. This site was originally designed as a strictly portfolio site and I&#8217;ve been adding to it since. Drop me a line on my <a href="/contact/">contact form</a> if you&#8217;ve got something to share. <img src='http://ounceoftalent.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </div>
<p><small>* If you haven&#8217;t seen the movie, ignore this reference.</small></p>
]]></content:encoded>
			<wfw:commentRss>http://ounceoftalent.com/2010/05/gravity-forms-tip-clean-confirmation-redirects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hide a div when you click outside of it using jQuery</title>
		<link>http://ounceoftalent.com/2009/12/hide-a-div-when-you-click-outside-of-it-using-jquery/</link>
		<comments>http://ounceoftalent.com/2009/12/hide-a-div-when-you-click-outside-of-it-using-jquery/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 14:45:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ounceoftalent.com/?p=220</guid>
		<description><![CDATA[I found this sweet little jQuery tip while working on a project the other day.
My Scenario
I was building out a jQuery calendar that would let users add information to the calendar via a popup div that displays when any day is clicked. Sticking with standard calendar UI, I wanted there to be three ways to [...]]]></description>
			<content:encoded><![CDATA[<p>I found this sweet little <a href="http://stackoverflow.com/questions/1403615/use-jquery-to-hide-div-when-click-outside-it">jQuery tip</a> while working on a project the other day.</p>
<p><strong>My Scenario</strong></p>
<p>I was building out a jQuery calendar that would let users add information to the calendar via a popup div that displays when any day is clicked. Sticking with standard calendar UI, I wanted there to be three ways to dismiss the popup:</p>
<ol>
<li>clicking &#8220;close&#8221; on the popup itself</li>
<li>clicking on another day, which would hide the current popup and display a new one on the day clicked</li>
<li>clicking anywhere off of the calendar</li>
</ol>
<p>The first two were simple enough, but I wasn&#8217;t sure what the best way to handle the third was. The jQuery tip suggested something along the lines of this:</p>
<pre class="brush: js">
var mouse_is_inside = false;

$(document).ready(function()
{
    $('#calendar').hover(function(){
        mouse_is_inside=true;
    }, function(){
        mouse_is_inside=false;
    });

    $(body).mouseup(function(){
        if(!mouse_is_inside) $('.event-popup').hide();
    });
});
</pre>
<p>Nothing too complicated here. The first portion sets up a variable that will let us store a true/false value and then sets that variable to true when the mouse is hovering on top of the calendar. For our purposes this is the equivalent to saying that the cursor is &#8220;inside&#8221; the calendar; which is what we want to know. If the mouse is not &#8220;inside&#8221; the calendar, we set the variable to false.</p>
<pre class="brush: js">
$(body).mouseup(function(){
        if(!mouse_is_inside) $('.event-popup').hide();
    });
</pre>
<p>This next bit of code fires on the mouseup event (this can fire on any event obviously). Now we have a conditional that checks if our mouse_is_inside variable is true and if so, it hides the popup event. Nothing crazy, but a simple solution if you ever need this functionality.</p>
]]></content:encoded>
			<wfw:commentRss>http://ounceoftalent.com/2009/12/hide-a-div-when-you-click-outside-of-it-using-jquery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Colony Marine</title>
		<link>http://ounceoftalent.com/2009/11/colony-marine/</link>
		<comments>http://ounceoftalent.com/2009/11/colony-marine/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 20:55:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://ounceoftalent.com/?p=203</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://ounceoftalent.com/2009/11/colony-marine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chatlee</title>
		<link>http://ounceoftalent.com/2009/11/chatlee/</link>
		<comments>http://ounceoftalent.com/2009/11/chatlee/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 20:52:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://ounceoftalent.com/?p=200</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://ounceoftalent.com/2009/11/chatlee/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Caris Dx Interior v1</title>
		<link>http://ounceoftalent.com/2009/11/caris-dx-interior-v1/</link>
		<comments>http://ounceoftalent.com/2009/11/caris-dx-interior-v1/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 20:51:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://ounceoftalent.com/?p=197</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://ounceoftalent.com/2009/11/caris-dx-interior-v1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Caris Dx Home v1</title>
		<link>http://ounceoftalent.com/2009/11/caris-dx-home-v1-2/</link>
		<comments>http://ounceoftalent.com/2009/11/caris-dx-home-v1-2/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 20:50:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://ounceoftalent.com/?p=194</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://ounceoftalent.com/2009/11/caris-dx-home-v1-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bennington</title>
		<link>http://ounceoftalent.com/2009/11/bennington/</link>
		<comments>http://ounceoftalent.com/2009/11/bennington/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 20:49:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://ounceoftalent.com/?p=191</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://ounceoftalent.com/2009/11/bennington/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bayport Interior v1</title>
		<link>http://ounceoftalent.com/2009/11/bayport-interior-v1/</link>
		<comments>http://ounceoftalent.com/2009/11/bayport-interior-v1/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 20:48:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://ounceoftalent.com/?p=188</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://ounceoftalent.com/2009/11/bayport-interior-v1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bayport Home v1</title>
		<link>http://ounceoftalent.com/2009/11/bayport-home-v1/</link>
		<comments>http://ounceoftalent.com/2009/11/bayport-home-v1/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 20:47:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://ounceoftalent.com/?p=185</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[]]></content:encoded>
			<wfw:commentRss>http://ounceoftalent.com/2009/11/bayport-home-v1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
