<?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>J.P. McGarrity.com</title>
	<atom:link href="http://jpmcgarrity.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://jpmcgarrity.com/blog</link>
	<description>Focusing on the Front End</description>
	<lastBuildDate>Sat, 30 Apr 2011 16:40:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Paul Irish on HTML5 Boilerplate Build Script</title>
		<link>http://jpmcgarrity.com/blog/2011/04/paul-irish-on-html5-boilerplate-build-script/</link>
		<comments>http://jpmcgarrity.com/blog/2011/04/paul-irish-on-html5-boilerplate-build-script/#comments</comments>
		<pubDate>Sat, 30 Apr 2011 16:40:56 +0000</pubDate>
		<dc:creator>J.P.</dc:creator>
				<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://jpmcgarrity.com/blog/?p=782</guid>
		<description><![CDATA[
If you&#8217;re familiar with html5 boilerplate check it out here.
]]></description>
			<content:encoded><![CDATA[<p><object width="480" height="390"><param name="movie" value="http://www.youtube.com/v/OXpCB3U_4Ig?fs=1&#038;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/OXpCB3U_4Ig?fs=1&#038;hl=en_US" type="application/x-shockwave-flash" width="480" height="390" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>If you&#8217;re familiar with html5 boilerplate check it out <a href="http://html5boilerplate.com">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jpmcgarrity.com/blog/2011/04/paul-irish-on-html5-boilerplate-build-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Check If HTML5 Local Storage Is Supported Using Modernizr</title>
		<link>http://jpmcgarrity.com/blog/2011/03/check-if-html5-local-storage-is-supported-using-modernizr/</link>
		<comments>http://jpmcgarrity.com/blog/2011/03/check-if-html5-local-storage-is-supported-using-modernizr/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 11:22:00 +0000</pubDate>
		<dc:creator>J.P.</dc:creator>
				<category><![CDATA[html5]]></category>
		<category><![CDATA[localstorage]]></category>

		<guid isPermaLink="false">http://jpmcgarrity.com/blog/?p=770</guid>
		<description><![CDATA[Here is a simple check that can be run if Modernizr is being used to check and see browser supports HTML5 Local Storage.
        if (Modernizr.localstorage) {
          alert('localStorage is available!');
         // run [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a simple check that can be run if Modernizr is being used to check and see browser supports HTML5 Local Storage.</p>
<p><code>        if (Modernizr.localstorage) {<br />
          alert('localStorage is available!');<br />
         // run localStorage code here...<br />
        }<br />
        else {<br />
          // no native support for local storage<br />
          alert('This Browser Doesn\'t Support Local Storage.');<br />
        }</code></p>
<p><a href="http://jpmcgarrity.com/examples/html5/localStorage/localStorageCheck.html">View Example of Detection</a></p>
<p>If you&#8217;re not familar with Modernizer download and read up on it <a href="http://www.modernizr.com/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jpmcgarrity.com/blog/2011/03/check-if-html5-local-storage-is-supported-using-modernizr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 Local Storage Example</title>
		<link>http://jpmcgarrity.com/blog/2011/03/html5-local-storage-example/</link>
		<comments>http://jpmcgarrity.com/blog/2011/03/html5-local-storage-example/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 01:49:52 +0000</pubDate>
		<dc:creator>J.P.</dc:creator>
				<category><![CDATA[html5]]></category>
		<category><![CDATA[localstorage]]></category>

		<guid isPermaLink="false">http://jpmcgarrity.com/blog/?p=761</guid>
		<description><![CDATA[Creating a local storage example using a To Do list.
First create an HTML file with an unordered list. The unordered list must have the html5 contenteditable=&#8221;true&#8221; attribute to allow the content to be modified. Also give the UL an ID so it can be targeted.
Here is the JS needed. Please note jQuery is needed for [...]]]></description>
			<content:encoded><![CDATA[<p>Creating a local storage example using a To Do list.</p>
<p>First create an HTML file with an unordered list. The unordered list must have the html5 contenteditable=&#8221;true&#8221; attribute to allow the content to be modified. Also give the UL an ID so it can be targeted.</p>
<p><strong>Here is the JS needed. Please note jQuery is needed for the following:</strong><br />
<code>		$(document).ready(function() {<br />
			var edit = document.getElementById('editableList');<br />
			$(edit).blur(function() {<br />
				localStorage.setItem('toDoData', this.innerHTML);<br />
			});<br />
			//when the page loads<br />
			if(localStorage.getItem('toDoData')){<br />
				edit.innerHTML = localStorage.getItem('toDoData');<br />
			}<br />
		});</code></p>
<p><a href="http://jpmcgarrity.com/examples/html5/localStorage/">View the Example</a></p>
<p><strong>In the inspector you can deleted the stored data. Note the data is stored per browser.</strong><br />
<img src="http://jpmcgarrity.com/blog/wp-content/uploads/2011/03/Screen-shot-2011-03-14-at-9.47.08-PM-300x120.png" alt="Screen shot 2011-03-14 at 9.47.08 PM" title="Screen shot 2011-03-14 at 9.47.08 PM" width="300" height="120" class="alignnone size-medium wp-image-765" /></p>
<h4>A Little More About Local Storage</h4>
<blockquote><p>
HTML5 storage provides a way for web sites to store information on your computer and retrieve it later. The concept is similar to cookies, but it’s designed for larger quantities of information. Cookies are limited in size, and your browser sends them back to the web server every time it requests a new page (which takes extra time and precious bandwidth). HTML5 storage stays on your computer, and web sites can access it with JavaScript after the page is loaded. &#8211; <a href="http://diveintohtml5.org/">http://diveintohtml5.org/</a>
</p></blockquote>
<p><a href="http://jpmcgarrity.com/blog/2009/07/html-5-bundle-for-textmate/">Checkout my HTML5 Textmate Bundle</a>, localStorage Snippets just added.</p>
]]></content:encoded>
			<wfw:commentRss>http://jpmcgarrity.com/blog/2011/03/html5-local-storage-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript: The Good Parts</title>
		<link>http://jpmcgarrity.com/blog/2011/03/javascript-the-good-parts/</link>
		<comments>http://jpmcgarrity.com/blog/2011/03/javascript-the-good-parts/#comments</comments>
		<pubDate>Mon, 14 Mar 2011 12:10:04 +0000</pubDate>
		<dc:creator>J.P.</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://jpmcgarrity.com/blog/?p=759</guid>
		<description><![CDATA[
Required watching for all JS developers. 
]]></description>
			<content:encoded><![CDATA[<p><iframe title="YouTube video player" width="480" height="390" src="http://www.youtube.com/embed/hQVTIJBZook" frameborder="0" allowfullscreen></iframe></p>
<p>Required watching for all JS developers. </p>
]]></content:encoded>
			<wfw:commentRss>http://jpmcgarrity.com/blog/2011/03/javascript-the-good-parts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create Links to Call and SMS From iPhone On the Web</title>
		<link>http://jpmcgarrity.com/blog/2011/03/create-links-to-call-and-sms-from-iphone-on-the-web/</link>
		<comments>http://jpmcgarrity.com/blog/2011/03/create-links-to-call-and-sms-from-iphone-on-the-web/#comments</comments>
		<pubDate>Mon, 14 Mar 2011 00:30:21 +0000</pubDate>
		<dc:creator>J.P.</dc:creator>
				<category><![CDATA[IOS]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://jpmcgarrity.com/blog/?p=750</guid>
		<description><![CDATA[Here are two key code snippets to add to your mobile website so users can contact you directly with their iPhone.
Format for a Phone Call.
href="tel:+1-212-555-1212"
Format for SMS Message.
href="sms:+1-212-555-1212"
]]></description>
			<content:encoded><![CDATA[<p>Here are two key code snippets to add to your mobile website so users can contact you directly with their iPhone.<br />
<code>Format for a Phone Call.<br />
href="tel:+1-212-555-1212"<br />
Format for SMS Message.<br />
href="sms:+1-212-555-1212"</code></p>
]]></content:encoded>
			<wfw:commentRss>http://jpmcgarrity.com/blog/2011/03/create-links-to-call-and-sms-from-iphone-on-the-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Event Listener with CSS3 Webkit Animations</title>
		<link>http://jpmcgarrity.com/blog/2011/03/javascript-event-listener-with-css3-webkit-animations/</link>
		<comments>http://jpmcgarrity.com/blog/2011/03/javascript-event-listener-with-css3-webkit-animations/#comments</comments>
		<pubDate>Sun, 13 Mar 2011 07:10:46 +0000</pubDate>
		<dc:creator>J.P.</dc:creator>
				<category><![CDATA[CSS 3]]></category>
		<category><![CDATA[IOS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[css/html]]></category>

		<guid isPermaLink="false">http://jpmcgarrity.com/blog/?p=743</guid>
		<description><![CDATA[CSS3 has a property called &#8220;webkitAnimationEnd&#8221; which can be used as an event lister in JavaScript.
function cssAnimationEnd() {
	//looks for the ID box from the css and fires the event listen when the animation is complete.
    box.addEventListener( 'webkitAnimationEnd', function( event ){
		alert( "Finished animation!" );
	}, false );
}
Working with event listers like this it is [...]]]></description>
			<content:encoded><![CDATA[<p>CSS3 has a property called &#8220;webkitAnimationEnd&#8221; which can be used as an event lister in JavaScript.</p>
<p><code>function cssAnimationEnd() {<br />
	//looks for the ID box from the css and fires the event listen when the animation is complete.<br />
    box.addEventListener( 'webkitAnimationEnd', function( event ){<br />
		alert( "Finished animation!" );<br />
	}, false );<br />
}</code></p>
<p>Working with event listers like this it is possible to chain CSS animations. This is a great method to use on IOS devices to improve animation frames compared to only working wth JavaScript.</p>
]]></content:encoded>
			<wfw:commentRss>http://jpmcgarrity.com/blog/2011/03/javascript-event-listener-with-css3-webkit-animations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS3 Webkit Fade Effect With KeyFrame</title>
		<link>http://jpmcgarrity.com/blog/2011/03/css3-webkit-fade-with-keyframe/</link>
		<comments>http://jpmcgarrity.com/blog/2011/03/css3-webkit-fade-with-keyframe/#comments</comments>
		<pubDate>Sun, 13 Mar 2011 06:17:52 +0000</pubDate>
		<dc:creator>J.P.</dc:creator>
				<category><![CDATA[CSS 3]]></category>
		<category><![CDATA[IOS]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[fade]]></category>
		<category><![CDATA[webkit animation]]></category>

		<guid isPermaLink="false">http://jpmcgarrity.com/blog/?p=739</guid>
		<description><![CDATA[Here is an example of a basic fade animation using a CSS3 fade using &#8220;-webkit-transition: opacity&#8221; property. Please note you need to use a webkit browser to view the animation working. 
View the example Here.
Here is the code used to create the animation:
			#box {
			width:500px;
			height:500px;
			background:#fff;
			padding:0;
			margin:0 auto;
			/*begin animation properties*/
			-webkit-animation-name: Navfade;
			-webkit-animation-duration: 2s;
			}
			@-webkit-keyframes Navfade {
				from {
					opacity: 0;
					  -webkit-transition: [...]]]></description>
			<content:encoded><![CDATA[<p>Here is an example of a basic fade animation using a CSS3 fade using &#8220;-webkit-transition: opacity&#8221; property. Please note you need to use a webkit browser to view the animation working. </p>
<p><a href="http://jpmcgarrity.com/examples/css/fade/">View the example Here</a>.</p>
<p><strong>Here is the code used to create the animation:</strong><br />
<code>			#box {<br />
			width:500px;<br />
			height:500px;<br />
			background:#fff;<br />
			padding:0;<br />
			margin:0 auto;<br />
			/*begin animation properties*/<br />
			-webkit-animation-name: Navfade;<br />
			-webkit-animation-duration: 2s;<br />
			}<br />
			@-webkit-keyframes Navfade {<br />
				from {<br />
					opacity: 0;<br />
					  -webkit-transition: opacity;<br />
				}<br />
				to {<br />
			  		opacity: 1;<br />
				}<br />
			}</code></p>
<p><a href="http://jpmcgarrity.com/blog/2011/03/basic-webkit-animation/">Here is a link</a> to another CSS3 animation post I created using the rotate with mask.</p>
]]></content:encoded>
			<wfw:commentRss>http://jpmcgarrity.com/blog/2011/03/css3-webkit-fade-with-keyframe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sync Textmate Bundles Across All your Macs With DropBox</title>
		<link>http://jpmcgarrity.com/blog/2011/03/sync-textmate-bundles-across-all-your-macs-with-dropbox/</link>
		<comments>http://jpmcgarrity.com/blog/2011/03/sync-textmate-bundles-across-all-your-macs-with-dropbox/#comments</comments>
		<pubDate>Sun, 13 Mar 2011 04:04:26 +0000</pubDate>
		<dc:creator>J.P.</dc:creator>
				<category><![CDATA[applications]]></category>
		<category><![CDATA[coding tool]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[bundles]]></category>
		<category><![CDATA[dropbox]]></category>
		<category><![CDATA[sync]]></category>
		<category><![CDATA[textmate]]></category>

		<guid isPermaLink="false">http://jpmcgarrity.com/blog/?p=729</guid>
		<description><![CDATA[
If you&#8217;re a heavy lifter with Textmate and create and customize bundles all the time this post is for you.
Copying bundles from one machine to another is cumbersome and easily forgotten.

I always find myself adding one command to a custom bundle at the office and then forgetting to add it to one of my machines [...]]]></description>
			<content:encoded><![CDATA[<p>
If you&#8217;re a heavy lifter with Textmate and create and customize bundles all the time this post is for you.</p>
<p>Copying bundles from one machine to another is cumbersome and easily forgotten.</p>
<p>
I always find myself adding one command to a custom bundle at the office and then forgetting to add it to one of my machines at the house.
</p>
<p>Before we begin you will need a Dropbox account. If you don&#8217;t already have one you can get a free one <a href="http://db.tt/YCldFqM">here</a></p>
<p><p><strong>Once you have Dropbox running you can run these 3 steps in Terminal.app</strong></p>
<p><em>It is highly recommend to run a backup of your bundles before attempting the steps below.</em></p>
<p><strong>Step 1. Move to your the folder where the Textmate bundles are located:</strong></p>
<p><code>$ cd ~/Library/Application\ Support/TextMate/</code></p>
<p><strong>Step 2. Move the Bundles folder to your Dropbox folder:</strong></p>
<p><code>$ mv Bundles ~/Dropbox/Bundles</code></p>
<p><strong>Step 3. Create a symlink in the DropBox folder to the &#8220;Application Support/TextMate/&#8221; directory:</strong></p>
<p><code>$ ln -s ~/Dropbox/Bundles/ Bundles</code></p>
<p>Repeat steps 1,2,3 on any machines that you need to sync up.</p>
]]></content:encoded>
			<wfw:commentRss>http://jpmcgarrity.com/blog/2011/03/sync-textmate-bundles-across-all-your-macs-with-dropbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic Javascript Closure</title>
		<link>http://jpmcgarrity.com/blog/2011/03/basic-javascript-closure/</link>
		<comments>http://jpmcgarrity.com/blog/2011/03/basic-javascript-closure/#comments</comments>
		<pubDate>Wed, 09 Mar 2011 12:54:54 +0000</pubDate>
		<dc:creator>J.P.</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://jpmcgarrity.com/blog/?p=725</guid>
		<description><![CDATA[Here is an example of a basic use of Javascript closure. A benefit of using a closure is it will not get cleaned up by garbage collection and cab be reused.
		function whoAmI(param){ // create the outer function and pass in the name
			var name = param; // name is equal to the param you passed in
			function [...]]]></description>
			<content:encoded><![CDATA[<p>Here is an example of a basic use of Javascript closure. A benefit of using a closure is it will not get cleaned up by garbage collection and cab be reused.<br />
<code>		function whoAmI(param){ // create the outer function and pass in the name<br />
			var name = param; // name is equal to the param you passed in<br />
			function myNameIs(){ // define the inner function so garbage collection won't remove it.<br />
				alert('hello: '+name);<br />
			}<br />
			return myNameIs; //return the function<br />
		}<br />
		$(document).ready(function() {<br />
			var nameToPass = 'Johnny Quest'; // create the name for the function<br />
			var myWhoAmI = whoAmI(nameToPass); //create var for the class and pass the name in.<br />
			myWhoAmI(); // run instance of the class. Note:Passing name here will be undifined based on scope.<br />
		});</code></p>
<p><a href="http://jpmcgarrity.com/examples/javascript/closureExample1/">View Example Page Here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jpmcgarrity.com/blog/2011/03/basic-javascript-closure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Expanding a HTML5 search input like Apple.com</title>
		<link>http://jpmcgarrity.com/blog/2011/03/expanding-a-html5-search-input-like-apple-com/</link>
		<comments>http://jpmcgarrity.com/blog/2011/03/expanding-a-html5-search-input-like-apple-com/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 01:32:43 +0000</pubDate>
		<dc:creator>J.P.</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://jpmcgarrity.com/blog/?p=718</guid>
		<description><![CDATA[Apple recently converted their site to html 5 and introduced a new navigation. The search which has always mirrored aspects of OSX and now acts like the IOS safari search. Once the input is focused the width is animated.
Here is a demo I made with jQuery mirroring what they are doing.
Here is the jQuery for [...]]]></description>
			<content:encoded><![CDATA[<p>Apple recently converted their site to html 5 and introduced a new navigation. The search which has always mirrored aspects of OSX and now acts like the IOS safari search. Once the input is focused the width is animated.</p>
<p><a href="http://jpmcgarrity.com/examples/jquery/expandingSearch.html">Here is a demo</a> I made with jQuery mirroring what they are doing.</p>
<p><strong>Here is the jQuery for the search box</strong><br />
<code>		var inputWdith = '200px';<br />
		var inputWdithReturn = '140px';<br />
		$(document).ready(function() {<br />
			$('input').focus(function(){<br />
				//clear the text in the box.<br />
				$(this).val(function() {<br />
		            $(this).val('');<br />
				});<br />
				//animate the box<br />
				$(this).animate({<br />
					width: inputWdith<br />
				}, 500 )<br />
			});<br />
			$('input').blur(function(){<br />
				$(this).val('Enter Search Value');<br />
				$(this).animate({<br />
					width: inputWdithReturn<br />
				}, 800 )<br />
			});<br />
		});</code></p>
]]></content:encoded>
			<wfw:commentRss>http://jpmcgarrity.com/blog/2011/03/expanding-a-html5-search-input-like-apple-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

